Wednesday, August 5, 2015

Entity Framework to Class object null check

date time null is a common problem in EF, we can easily handle with this.

  if (pic.dbirthday != null)  
         bo.dbirthday = Convert.ToDateTime(pic.dbirthday.Value.Date.ToString("MM/dd/yyyy"));  

C# print file on LAN Printer

If you want to print any file on network printer then you can try with this code block // Change Default Printer System.Ma...