linq to sql - How to deal with DateTime field when using LEFT OUTER JOIN in LinqToSql -
I have 2 tables, employees and absence I want to include the left outer so that I get all the employees and any related absences Can I In LINQ2SQL, I can use the following to create a LEFT OUTER JOIN:
In an absence of empires. From the AE in the equivalent of Empireide X Select the default IFEmpty () new {FULLNAME = e.Surname + "," + e.Forename} "
This is what I see but I started the absence of any I want to select
new {FULLNAME = e.Surname + "," + e.Forename, x.StartDate}
I can change the selection statement but I get an error because the datetime is not worth the faucet if there is no start date or actual date, how can I show an empty string? Trying to use StartDate.SortDateString () but it clearly throws an error, if it is empty, then I have also tried:
choose new {alias = E. Name, StartDate = x.StartDate == Faucet? "": X.startout}
But this does not work either. Any suggestions?
Select write statement
select new {FULLNAME = e.
< / P>
Comments
Post a Comment