Automapper Project using
问题 I am currently using automapper in my backend to map objects to models. I recently decided to use the following code to handle all my timezone conversions: cfg.CreateMap<DateTime?, DateTime?>() .ProjectUsing(i => DbFunctions.AddHours(i, offset.Hours)); cfg.CreateMap<DateTime, DateTime>() .ProjectUsing(i => DbFunctions.AddHours(i, offset.Hours).Value); Object.ProjectTo<ObjectModel>().SingleOrDefault(); then it works fine and the object is mapped and timezone converted However when i am using