public dynamic GetProductTypeFields(GetProductTypeFieldsInputModel data) { using (var con = new SqlConnection(configuration.GetValue <string>("ConnectionString:SQLConnection"))) { try { var dbParams = new DynamicParameters(); con.Open(); dbParams.Add("@Id", data.Id); var reader = con.Query <dynamic>( sql: "[dbo].[GetProductTypeFieldsById]", param: dbParams, commandType: CommandType.StoredProcedure); return(reader); } catch (Exception ex) { throw ex; } finally { con.Close(); } } }
public dynamic GetProductTypeFieldsService(GetProductTypeFieldsInputModel data) { return(_ProductRepository.GetProductTypeFields(data)); }
public IActionResult GetProductTypeFields(GetProductTypeFieldsInputModel data) { return(Ok(_productService.GetProductTypeFieldsService(data))); }