public async Task <int> SaveCusAddressAsync(MstrCustomerAddressList cusAddressList) { DynamicParameters para = new DynamicParameters(); para.Add("AutoId", cusAddressList.AutoId); para.Add("CustomerLocId", cusAddressList.CusLocationId); para.Add("AddressTypeId ", cusAddressList.AddressTypeId); para.Add("CustomerID", cusAddressList.CustomerId); para.Add("City", cusAddressList.City.Trim()); para.Add("CountryId", cusAddressList.CountryId); para.Add("CurrencyId", cusAddressList.CurrencyId); para.Add("VATNo", cusAddressList.VatNo.Trim()); para.Add("TaxNo", cusAddressList.TaxNo.Trim()); para.Add("TinNo", cusAddressList.TinNo.Trim()); para.Add("ZipPostalCode", cusAddressList.ZipPostalCode.Trim()); para.Add("AddressTo", cusAddressList.AddressTo.Trim()); para.Add("Address", cusAddressList.Address.Trim()); para.Add("Email", cusAddressList.Email.Trim()); para.Add("Tel", cusAddressList.Tel.Trim()); para.Add("UserId", cusAddressList.CreateUserId); para.Add("@Result", dbType: DbType.Int32, direction: ParameterDirection.Output); var result = await DbConnection.ExecuteAsync("spMstrCustomerAddressSave", para , commandType : CommandType.StoredProcedure); return(para.Get <int>("Result")); }
public async Task <IActionResult> SaveCustomerAddressList(MstrCustomerAddressList cusAddressList) { var result = await _masterRepository.SaveCusAddressAsync(cusAddressList); return(Ok(result)); }