Make sure the following references are set to Copy Local = True, Specific Version = False
- System.Web.Http
- System.Web.Http.WebHost
- System.Net.Http.Formatting
If you need to perform a DateDiff between 2 dates in your LINQ query:
var results = from r in db.Results where r.Extra2 == id && r.CampaignID == 64 select new { Phone = r.Phone, Pickup = r.PickUp, Duration = EntityFunctions.DiffSeconds(r.PickUp,r.HangUp), AnswerType = r.AnswerType };
Notice the line - EntityFunctions.DiffSeconds(r.PickUp,r.HangUp)
Mapper.CreateMap(); TsMerchant e = Mapper.Map (model);