Exemplo n.º 1
0
        public HttpResponseMessage AddCustomer(CustomersDto customer)
        {
            var repo   = new CustomersRepository();
            var result = repo.Create(customer);

            if (result)
            {
                return(Request.CreateResponse(HttpStatusCode.Created));
            }
            return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "Could not create recipe, try again later..."));
        }
Exemplo n.º 2
0
 public async Task CreateCustomer(Customer newCustomer)
 {
     await _customersRepository.Create(newCustomer);
 }
 //新增會員
 public void CreateCustomer(Customers model)
 {
     repository.Create(model);
 }
 internal Customer Create(Customer newCustomer)
 {
     return(_repo.Create(newCustomer));
 }