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