Like (contains) in c# with a string extension

This is an extension to make a contains between 2 sting : public static class StringExtensions { public static bool Contains(this String str, String substring, StringComparison comp) { if (substring == null) throw new ArgumentNullException("substring", "substring cannot be null."); else if (! Enum.IsDefined(typeof(StringComparison), comp)) throw new ArgumentException("comp is not a member of StringComparison", "comp"); return … Continue reading Like (contains) in c# with a string extension

GROUP_CONCAT string aggregate for SQL Server

Hello, Generally, when making sql requests, it is common to perform concatenation as well as group by in a single column. In order to overcome this problem we found with an expert from ORCO. A project on codeplex allowing to update the sqlServer in script in order to have method GROUP_CONCAT in sql. In practice … Continue reading GROUP_CONCAT string aggregate for SQL Server

Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details

Actually,when you should see the errors if you drill into that array in Visual studio during debug. But you can also catch the exception and then write out the errors to some logging store or the console: try { // Your code... // Could also be before try if you know the exception occurs in … Continue reading Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details