public async Task <bool> GetAllNBTScoresAsync(IntakeYear period) { log4net.Config.XmlConfigurator.Configure(); // BasicConfigurator.Configure(); bool isloaded = false; AllScores = new ObservableCollection <CompositBDO>(); using (var context = new NBT_ProductionEntities()) { var scores = await context.Composits.Where(x => x.DOT > period.yearStart && x.DOT < period.yearEnd).Select(m => m).ToListAsync(); if (scores != null) { isloaded = true; foreach (var score in scores) { var NBTScore = new CompositBDO(); CompositDALToCompositBDO(NBTScore, score); AllScores.Add(NBTScore); } } } log.Info("Composite is loaded"); return(isloaded); }
static void IntakeYearDalToIntakeYearBDO(IntakeYear intakeDAL, IntakeYearsBDO intakeBDO) { intakeBDO.Year = intakeDAL.Year; intakeBDO.yearID = intakeDAL.yearID; intakeBDO.yearStart = intakeDAL.yearStart; intakeBDO.yearEnd = intakeDAL.yearEnd; intakeBDO.DateModified = intakeDAL.DateModified; }
public IntakeYear GetIntakeRecord(int year) { var myYear = new IntakeYear(); using (var context = new NBT_ProductionEntities()) { myYear = context.IntakeYears.Where(x => x.Year == year).Select(m => m).FirstOrDefault(); } return(myYear); }
public Task <bool> GetAllNBTScoresAsync(IntakeYear period) { throw new NotImplementedException(); }