コード例 #1
0
ファイル: CustomerAccess.cs プロジェクト: rennishj/RealEstate
 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");
     }
 }
コード例 #2
0
ファイル: CustomerLogic.cs プロジェクト: rennishj/RealEstate
 public async Task<int> CustomerCreateAsync(Customer cst)
 {
     return await CustomerDAL.CustomerCreateAsync(cst);
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: rennishj/RealEstate
 private static void CreateCustomer(Customer cst)
 {
     Console.WriteLine("CustomerId:{0} got created", new CustomerLogic().CustomerCreateAsync(cst).Result);
 }