private ReceptionGroupModel Get(ReceptionGroupModel rg) { var res = (from r in _receptionGroups where r.Id == rg.Id select r).Single(); return(res); }
private bool Has(ReceptionGroupModel rg) { var res = (from r in _receptionGroups where r.Id == rg.Id select r).Count() > 0; return(res); }
private ReceptionModel Get(long id, ReceptionGroupModel frg) { var r = (from x in frg.Receptions where x.Id == id select x).Single(); return(r); }
private bool Has(long id, ReceptionGroupModel frg) { var r = (from x in frg.Receptions where x.Id == id select x).Count() > 0; return(r); }
private (PersonDisplayModel person, GroupModel team, DayModel day, ReceptionModel reception, ReceptionGroupModel receptionGroup) Get() { var person = new PersonDisplayModel { Category = _reader["category"] as string ?? string.Empty, CategoryKey = _reader["category_key"] as string ?? string.Empty, FirstName = _reader["first_name"] as string ?? string.Empty, LastName = _reader["last_name"] as string ?? string.Empty, Id = _reader["person_id"] as long? ?? 0 }; var team = new GroupModel { Id = _reader["team_id"] as long? ?? 0, Name = _reader["team"] as string ?? string.Empty }; var did = (_reader["day"] as long? ?? 0); var day = new DayModel { DayName = did.AsDay(), DayId = did }; var reception = new ReceptionModel { Id = _reader["reception_id"] as long? ?? 0, ReceptionName = _reader["reception"] as string ?? string.Empty, }; var receptionGroup = new ReceptionGroupModel { ReceptionGroupName = _reader["reception_group"] as string ?? string.Empty, Id = _reader["reception_group_id"] as long? ?? 0, }; return ( person, team, day, reception, receptionGroup ); }