/// <summary> /// Maps the domain model passed into it to an entity model in context. Then saves it to the DB. /// </summary> /// <param name="genericType"></param> public void Add(Order genericType) { genericType.CalculateOrderPrice(); context.DBOrders.Add(mapperOrder.Map(genericType)); context.SaveChanges(); }
/// <summary> /// Maps the domain model passed into it to an entity model in context. Then saves it to the DB. /// </summary> /// <param name="genericType"></param> public void Add(Order genericType) { context.DBOrders.Add(mapperOrder.Map(genericType, context)); context.SaveChanges(); }