public int AddOrder(OrdersVM orderVM) { try { var order = _mapper.Map <Orders>(orderVM); order.Id = Guid.NewGuid(); order.PurchasedDate = DateTime.Now; return(_orderRepo.AddOrders(order).Result); } catch (Exception ex) { throw ex; } }
public int AddOrder(OrdersVM orderVM) { try { var order = _mapper.Map <Orders>(orderVM); order.Id = Guid.NewGuid(); order.PurchasedDate = DateTime.Now; return(_orderRepo.AddOrders(order).Result); } catch (Exception ex) { throw ex; } }