public async Task <ICollection <Glb_Cat_Catalog> > ListCollection(Glb_Cat_Catalog model) { using (var connection = new SqlConnection(ConnectionString)) { var result = connection.Query < Common.Glb_Cat_Catalog> ("PA_CON_GLB_CAT_CATALOG_GET", param: new { P_SEARCH_KEY = model.Search_Key // P_PK_GLB_CAT_CATALOG = model.Pk_Glb_Cat_Catalog, // P_CREATION_DATE = model.Creation_Date, // P_CREATION_USER = model.Creation_User, // P_MODIFICATION_DATE = model.Modification_Date, // P_MODIFICATION_USER = model.Modification_User, // P_FK_GLB_CAT_CATALOG = model.Fk_Glb_Cat_Catalog, // P_FK_GLB_CAT_TYPE_CATALOG = model.Fk_Glb_Cat_Type_Catalog, // P_VALUE = model.Value, // P_DESCRIPTION = model.Description, // P_EDITABLE = model.Editable, // P_ACTIVE = model.Active, // P_SEARCH_KEY_TYPE_CATALOG = model.Search_Key_Type_Catalog }, commandType: CommandType.StoredProcedure); return(await Task.FromResult <ICollection <Common.Glb_Cat_Catalog> >(result.ToList())); } }
public async Task <IEnumerable <Glb_Cat_Catalog> > List(Glb_Cat_Catalog model) { using (var connection = new SqlConnection(ConnectionString)) { var result = connection.Query < Common.Glb_Cat_Catalog> ("PA_CON_GLB_CAT_CATALOG_GET", param: new { P_SEARCH_KEY = model.Search_Key, }, commandType: CommandType.StoredProcedure); return(await Task.FromResult <IEnumerable <Glb_Cat_Catalog> >(result.ToList())); } }