public static IList<SoftwareEncoder> ListAllSofwareEncodersAudio() { using (ICardRepository cardRepository = new CardRepository()) { return cardRepository.GetQuery<SoftwareEncoder>(s => s.Type == 1).OrderBy(s => s.Priority).ToList(); } }
public static Card GetCardByDevicePath(string devicePath) { using (ICardRepository cardRepository = new CardRepository()) { var query = cardRepository.GetQuery<Card>(c => c.DevicePath == devicePath); query = cardRepository.IncludeAllRelations(query); Card card = query.ToList().FirstOrDefault(); return card; } }
public static Card GetCard(int idCard, CardIncludeRelationEnum includeRelations) { using (ICardRepository cardRepository = new CardRepository()) { IQueryable<Card> query = cardRepository.GetQuery<Card>(c => c.IdCard == idCard); query = cardRepository.IncludeAllRelations(query, includeRelations); Card card = query.ToList().FirstOrDefault(); return card; } }