Пример #1
0
 public OrderStatus Update(OrderStatus entity)
 {
     Debug.WriteLine("UPDATING orderStatus in database");
     var existing = OrderStatuses.First(c => c.ID == entity.ID);
     Mapper.Map(entity, existing);
     return entity;
 }
Пример #2
0
 public OrderStatus Insert(OrderStatus entity)
 {
     Debug.WriteLine("INSERTING orderStatus into database");
     var nextID = OrderStatuses.Max(c => c.ID) + 1;
     entity.ID = nextID;
     OrderStatuses.Add(Mapper.Map(entity, new OrderStatus()));
     return entity;
 }
Пример #3
0
 public async Task<OrderStatus> UpdateAsync(OrderStatus entity)
 {
     return Update(entity);
 }
Пример #4
0
 public async Task<OrderStatus> InsertAsync(OrderStatus entity)
 {
     return Insert(entity);
 }