public async Task <IEnumerable <ApGetSiteAliasByLustId2> > ApGetSiteAliasByLustId(int lustId) { var lustIdParam = new SqlParameter("@LustId", lustId); if (lustIdParam.Value == null) { lustIdParam.Value = DBNull.Value; } var exeSp = "execute dbo.ApGetSiteAliasByLustIdData @LustId "; var results = await _dbContext.Set <ApGetSiteAliasByLustId2>().AsNoTracking().FromSql(exeSp, lustIdParam).ToListAsync(); var resultList = new List <ApGetSiteAliasByLustId2>(); foreach (var result in results) { resultList.Add(new ApGetSiteAliasByLustId2 { LustId = lustId, SiteNameAlias = result.SiteNameAlias, LastChangeBy = result.LastChangeBy, LastChangeDate = result.LastChangeDate, SiteNameAliasId = result.SiteNameAliasId, LogNumber = result.LogNumber }); } return(resultList); }
public async Task <IEnumerable <ConfirmationType> > GetConfirmationTypes() { return(await _dbContext.Set <ConfirmationType>().AsNoTracking().FromSql(ExecuteApGetOLPRRLookupTables, ConfirmationTypeTable).ToListAsync()); }