public async Task <IActionResult> Create() { DeviceVM.Groups = await _groupsRepository.GetAll().ToListAsync(); DeviceVM.Models = await _modelRepository.GetAll().ToListAsync(); return(View(DeviceVM)); }
public List <Group> GetAllGroups() { using (Db.BeginReadOnlyWork()) { return(_groupsRepository.GetAll(g => g.Speciality)); } }
public async Task <IActionResult> Index() { var groups = await _groupsRepository.GetAll().ToListAsync(); GroupVM.Groups = groups; ViewBag.Current = "Groups"; return(View(GroupVM)); }
public override void GoGoGo() { var groupNames = _contactsConfiguration.GroupsToMessage; var groups = _groupsRepository.GetAll() .Where(g => groupNames.Any(gn => gn.Equals(g.Name, StringComparison.InvariantCultureIgnoreCase))) .Select(g => g.Id) .ToList(); var contacts = _contactsRepository.GetAllInGroups(groups).ToList(); var sender = new TextMessaging(_textMessagingService); SendToMales(sender, contacts, _contactsConfiguration.MaleMessage); SendToFemales(sender, contacts, _contactsConfiguration.FemaleMessage); }
public IList <Group> GetGroups() { return(_groupsRepository.GetAll()); }
public async Task <List <Group> > GetGroups() { return(await _groupsRepository.GetAll()); }
/// <summary> /// Повертає список груп /// </summary> /// <returns>Список груп</returns> public IEnumerable <GroupsDtoModel> GetGroups() { var mapper = new MapperConfiguration(cfg => cfg.CreateMap <GroupsModel, GroupsDtoModel>()).CreateMapper(); return(mapper.Map <IEnumerable <GroupsDtoModel> >(groupsRepository.GetAll())); }
public IEnumerable <GroupsViewModel> GetAll() { return(_mapper.Map <IEnumerable <GroupsViewModel> >(_groupsRepository.GetAll())); }
public IEnumerable <Group> GetAll([FromRoute] GroupType type) { return(repository.GetAll(type)); }
/* * * public object GetAllAtivos(int pIdEmpresa, int page, int length) * { * var EventoContaEntity = _leiloeiroRepository.GetAllAtivos(pIdEmpresa, page, length); * var Registros = _leiloeiroConverter.ParseList(EventoContaEntity); * var TotalRegistros = _leiloeiroRepository.Count(pIdEmpresa); * return new { Registros, TotalRegistros }; * } * */ /// <summary> /// Return Groups by CompanyId /// </summary> /// <param name="pCompanyId"></param> /// <param name="pId"></param> /// <param name="page"></param> /// <param name="length"></param> /// <returns></returns> public List <GroupsVo> GetAll(int pCompanyId, int pId = 0, int page = 1, int length = 30) => _groupsConverter.ParseList(_groupsRepository.GetAll(pCompanyId, pId, page, length));
public IEnumerable <Group> GetAllGroups() { return(groupsRepository.GetAll()); }