public IVmListItem GetLanguageByCode(string code) { var result = new VmListItem(); contextManager.ExecuteReader(unitOfWork => { var rep = unitOfWork.CreateRepository <ILanguageRepository>(); result = translationEntToVm.TranslateFirst <Language, VmListItem>(rep.All().Where(x => x.Code == code.ToLower())); }); return(result); }
public VmBugReport GetBugReportById(Guid id) { var result = new VmBugReport(); contextManager.ExecuteWriter(unitOfWork => { var bugReportRepository = unitOfWork.CreateRepository <IBugReportRepository>(); result = translationManager .TranslateFirst <BugReport, VmBugReport>(bugReportRepository.All().Where(x => x.Id == id)); }); return(result); }