Notes, tips and tricks
-
Empty space in Razor
When we use Razor view engine to generate text trying to keep well formated code like this
Read more... -
The Performance Golden Rule
The Performance Golden Rule in web development: 80-90% of the end-user response time is spent on the frontend.
Read more... -
Life cycle management in Ninject
Configuration of object's life-time in Ninject is set by invocation of appropriate method as it's shown below
Read more... -
Ninject and ASP.NET Web API
WebAPI was appeared in beta version of ASP.NET MVC4 with a new namespace. System.Web.Http is an analogue of System.Web.Mvc namespace with ApiController class, action filters, and many other similar classes with which we are familiar from the ASP.NET MVC. There is IDependencyResolver that is an analogue of IDependencyResolver from System.Web.Mvc. And I find it necessary to write my own realization of IDependencyResolver for Ninject.
Read more... -
Month names in .NET
To get text name of a month from its ordinal number, you can easily use
Read more... -
RazorEngine
You can use .cshtml templates to create text content, for example for massive email sending slightly different for each user. There are at least two ways to do it.
Read more... -
MS Unit Testing
A short list of attributes for Microsoft Unit Testing Framework to get started
Read more... -
EF Code First Attached/Detached entities
POCO-classes in Entity Framework Code First might have two states: attached and detached. In the state attached to the context all changes are detected and in case they exist, the use of method SaveChanges() writes current state to database. If the object is not attached, the changes won't certainly be detected and saved to the database.
Read more...