public Response Create(NewMerchant merchant) { Response response = new Response(); try { using (IDbConnection conn = GetConnection()) { Merchants obj = new Merchants() { IsActive = true, MerchantAddress = merchant.MerchantAddress, MerchantName = merchant.MerchantName, MerchantPhone = merchant.MerchantPhone, SubscriptionPlan = merchant.SubscriptionPlan }; conn.Insert(obj); response.Status = true; response.Description = "Record saved"; } } catch (Exception ex) { response.Description = ex.Message; response.Status = false; } return(response); }
public Response Post([FromBody] NewMerchant value) { return(repo.Create(value)); }