adaption

Adapting Linq Entity objects to Domain objects

Hi, I have the following code which adapts linq entities to my Domain objects: return from g in DBContext.Gigs select new DO.Gig { ID = g.ID, Name = g.Name, Description = g.Description, StartDate = g.Date, En...

LinqToSQl and adapting from linq to Domain objects in a centralised manner

Imagine the following code: return from a in DBContext.Acts join artist in DBContext.Artists on a.ArtistID equals artist.ID into art from artist in art.DefaultIfEmpty() select new Shared.DO.Act { ID = a.ID, Name = a.Name, Artist = new Shared.DO.Artist { ...