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"));  

Popular posts from this blog

WPF Crystal Report Viewer Using SAP

mvc razor textboxfor change event change another textboxfor value

ASP.NET MVC razor SAP Crystal report