Exemplo n.º 1
0
        public async Task <CustomerViewModel> CreateCustomerAsync(CustomerViewModel customer)
        {
            CustomerDataModel customerData = _mapper.Map <CustomerDataModel>(customer);
            await _dB.InsertCustomerAsync(customerData);

            //var createdCustomer = _mapper.Map<CustomerViewModel>(customerData);
            customer.Id = customerData.Id;

            return(customer);
        }
Exemplo n.º 2
0
        public async Task <bool> UpdateCustomerAsync(Guid id, CustomerDataModel customerData)
        {
            var result = await _db.UpdateAsync(CustomersTable, id, customerData);

            return(result);
        }
Exemplo n.º 3
0
 public async Task InsertCustomerAsync(CustomerDataModel customerData)
 {
     await _db.InsertRecordAsync(CustomersTable, customerData);
 }