Tuesday, November 2, 2021

Foreach entity framework query

 employee.ForEach(em=>
                    {
                        em.sal= (em.sal !=null ?em.sal:0);
                    });

Friday, August 6, 2021

How to Count Total Number of HIT in Asp.net MVC?

 Applicatin_start()

 Application.Lock();  

Application["Totaluser"] = (int)Application["Totaluser"] + 1;        

Application.UnLock(); 

Friday, July 23, 2021

How to add zeros after decimal point

 var a= 10.1;

var result  = a.ToString("f2");

result = 10.10;

Monday, February 1, 2021

Cannot drop database "abc" because it is currently in use.

We will face the problem:

USE TEstDb;
DROP DATABASE TEstDb;

Solution:

 Use Master

DROP DATABASE TEstDb