public dynamic InsertSeller(SellerInsertServiceInputModel data) { using (var con = new SqlConnection(configuration.GetValue <string>("ConnectionString:SQLConnection"))) { try { var res = Newtonsoft.Json.JsonConvert.SerializeObject(data); var dbParams = new DynamicParameters(); con.Open(); dbParams.Add("@item", Newtonsoft.Json.JsonConvert.SerializeObject(data)); var reader = con.Query <dynamic>( sql: "[dbo].[SellerInsertProcedure]", param: dbParams, commandType: CommandType.StoredProcedure); return(reader); } catch (Exception ex) { throw ex; } finally { con.Close(); } } }
public IActionResult Insert(SellerInsertServiceInputModel data) { return(Ok(_sellerService.InsertSellerService(data))); }
public dynamic InsertSellerService(SellerInsertServiceInputModel data) { return(_sellerRepository.InsertSeller(data)); }