Avatar of Johny Bravo
Johny Bravo

asked on 

help with linq select

Hello Experts,

I am having below code,

 var inv = from e in _context.Customers                        
                      select new Model.Customer
                          CustomerId = e.CustomerId,
                          CustomerName = e.CustomerName,
                          Address = e.Address,
                          contact1 = e.Contact1,
                          ContactNo2 = e.Contact2,                        
                          DateOfBirth =Convert.ToDateTime(e.DateOfBirth),
                          Anniversary = Convert.ToDateTime(e.Anniversary),

Now DateOfBirth & Anniversary both fields may come as NULL values from database as they are not madatory.How can I check this?
ASP.NETC#Microsoft DevelopmentLINQ Query

Avatar of undefined
Last Comment
Tony O'Byrne

8/22/2022 - Mon