示例#1
0
 /// <summary>
 /// Удаление заказа
 /// </summary>
 /// <param name="orderView"></param>
 public void Delete(OrderViewModel orderView)
 {
     orderRepository.Delete(Convert(orderView));
 }
示例#2
0
 /// <summary>
 /// Редактирование заказа
 /// </summary>
 /// <param name="category"></param>
 public void Edit(OrderViewModel orderView)
 {
     orderView.UpdateDate = DateTime.Now;
     orderRepository.Add(Convert(orderView));
 }
示例#3
0
 /// <summary>
 /// Конвертационные функции
 /// </summary>
 private Models.Order Convert(OrderViewModel c)
 {
     return new Models.Order()
     {
         Id = c.Id,
         CreatedDate = c.CreatedDate,
         UpdateDate = c.UpdateDate,
         CustomerId = c.CustomerId
     };
 }