public async Task<int> CustomerCreateAsync(Customer cst) { try { return await RealEstateDB.SingleAsync<int>("dbo.CustomerCreate", cst); } catch (Exception ex) { logger.Error(string.Format("Error creating the customer with email:{0}", cst.Email), ex); throw new DALException("Couldnot create the customer"); } }
public async Task<int> CustomerCreateAsync(Customer cst) { return await CustomerDAL.CustomerCreateAsync(cst); }
private static void CreateCustomer(Customer cst) { Console.WriteLine("CustomerId:{0} got created", new CustomerLogic().CustomerCreateAsync(cst).Result); }