コード例 #1
0
 /// <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();
 }
コード例 #2
0
 /// <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();
 }