Skip to main content
8 votes

Recording error messages from an exception

In C# 6 or later you can write it in a single line of code using the null conditional operator (?.) and the null coalescing operator (...
Zohar Peled's user avatar
6 votes

Recording error messages from an exception

Assuming you have at least c# 6 (and thus, the null propagation operator), you can simplify it like this: ...
zaitsman's user avatar
  • 161
3 votes

Recording error messages from an exception

You can use GetBaseException to get the lowest level exception. ...
Mike Norgate's user avatar
2 votes

Web Api to upload excel file

Naming Convention current code is not using camelCase naming convention on local variables, and also is not given a good naming ...
iSR5's user avatar
  • 6,383
2 votes

Open closed principle in a method

Before reviewing micro-design we may focus on overall architecture. You already know that in future you will also need to read an Excel file, it may be a good moment to introduce an abstract base ...
Adriano Repetti's user avatar
2 votes

DbSet<T> IncludeAll method

Include uses when you want to include ICollection properties or not int, string, ...
Islam Alshiki's user avatar
1 vote

DbSet<T> IncludeAll method

EF knows about all navigation properties. So, instead of using reflection and try to figure it out by myself, I can just ask the DbContext about navigation ...
Dejan's user avatar
  • 143

Only top scored, non community-wiki answers of a minimum length are eligible