Esempio n. 1
0
        public async Task <Order> UpdateAsync(OrderUpdateModel order)
        {
            await BookGetService.ValidateAsync(order);

            await CustomerGetService.ValidateAsync(order);

            return(await OrderDataAccess.UpdateAsync(order));
        }
Esempio n. 2
0
        public async Task <Order> CreateAsync(OrderUpdateModel order)
        {
            await BookGetService.ValidateAsync(order);

            await CustomerGetService.ValidateAsync(order);

            order.Date    = DateTime.Now;
            order.Arrived = false;

            return(await OrderDataAccess.InsertAsync(order));
        }