private Expert GetExpertByNameAndSession( [NotNull] string expertName, [NotNull] SessionOfExperts sessionOfExperts, ExpertFetch expertFetch) { var expert = _expertRepository.GetExpertByNameAndSession( new GetExpertByNameAndSessionSpecification(expertName, sessionOfExperts, expertFetch)); return(expert); }
public GetExpertsBySessionSpecification([NotNull] SessionOfExperts sessionOfExperts, ExpertFetch fetch) { if (sessionOfExperts == null) { throw new ArgumentNullException(nameof(sessionOfExperts)); } SessionOfExperts = sessionOfExperts; Fetch = fetch; }
private IQueryable <Expert> FetchQuery(ExpertFetch expertFetch) { var query = _linqProvider.Query <Expert>(); if ((expertFetch & ExpertFetch.Associations) == ExpertFetch.Associations) { query.FetchMany(x => x.Associations); } if ((expertFetch & ExpertFetch.Relations) == ExpertFetch.Relations) { query.FetchMany(x => x.Relations); } return(query); }
public GetExpertByNameAndSessionSpecification( [NotNull] string expertName, [NotNull] SessionOfExperts sessionOfExperts, ExpertFetch fetch) { if (expertName == null) { throw new ArgumentNullException(nameof(expertName)); } if (sessionOfExperts == null) { throw new ArgumentNullException(nameof(sessionOfExperts)); } ExpertName = expertName; SessionOfExperts = sessionOfExperts; Fetch = fetch; }