public List<Session> GetAllByClassificationAndCoachee(ESessionClassification classification, Person person) { var coachee = person.User.FirstOrDefault().Coachee.FirstOrDefault(); if (coachee != null) return _context.Session.Where(x => x.EvaluationCoachee.FirstOrDefault().IdCoachee == coachee.Id && x.Classification == classification).ToList(); return new List<Session>(); }
public List<Session> GetAllByClassificationAndCoachAndCoachingProcess(ESessionClassification classification, Person person, Guid idCoacingProcess) { var coach = person.User.FirstOrDefault().Coach.FirstOrDefault(); if (coach != null) return _context.Session.Where(x => x.EvaluationCoach.FirstOrDefault().IdCoach == coach.Id && x.Classification == classification && x.IdCoachingProcess == idCoacingProcess).ToList(); return new List<Session>(); }
public Person Create(CreatePersonCommand command) { var Person = new Person(command.Name, command.CPF, command.BirthDate, command.Genre, command.Address, command.Phone, command.Photograph); Person.Validate(); _repository.Create(Person); if (Commit()) return Person; return null; }
public List<Session> GetAllByClassificationAndCoacheeAndCoachingProcess(ESessionClassification classification, Person coachee, Guid idCoachingProcess) { return _repositorySession.GetAllByClassificationAndCoacheeAndCoachingProcess(classification, coachee, idCoachingProcess); }
public List<Session> GetAllByClassificationAndCoachee(ESessionClassification classification, Person coachee) { return _repositorySession.GetAllByClassificationAndCoachee(classification, coachee); }
public List<Session> GetAllByCoacheeAndCoachingProcess(Person coachee, Guid idCoachingProcess) { return _repositorySession.GetAllByCoacheeAndCoachingProcess(coachee, idCoachingProcess); }
public List<Session> GetAllByCoachee(Person coachee) { return _repositorySession.GetAllByCoachee(coachee); }
public List<Session> GetAllByCoachAndCoacheeAndClassification(Person coach, Person coachee, ESessionClassification classification) { return _repositorySession.GetAllByCoachAndCoacheeAndClassification(coach, coachee, classification); }
public List<Session> GetAllByCoach(Person person) { var coach = person.User.FirstOrDefault().Coach.FirstOrDefault(); if (coach != null) return _context.Session.Where(x => x.EvaluationCoach.FirstOrDefault().IdCoach == coach.Id).ToList(); return new List<Session>(); }
public List<Session> GetAllByCoacheeAndCoachingProcess(Person person, Guid idCoachingProcess) { var coachee = person.User.FirstOrDefault().Coachee.FirstOrDefault(); if (coachee != null) return _context.Session.Where(x => x.EvaluationCoachee.FirstOrDefault().IdCoachee == coachee.Id && x.IdCoachingProcess == idCoachingProcess).ToList(); return new List<Session>(); }
public List<Session> GetAllByCoachAndCoachee(Person coachPerson, Person coacheePerson) { var coach = coachPerson.User.FirstOrDefault().Coach.FirstOrDefault(); var coachee = coacheePerson.User.FirstOrDefault().Coachee.FirstOrDefault(); if (coachee != null && coach != null) return _context.Session.Where(x => x.EvaluationCoachee.FirstOrDefault().IdCoachee == coachee.Id && x.EvaluationCoach.FirstOrDefault().IdCoach == coach.Id).ToList(); return new List<Session>(); }
public void Update(Person Person) { _context.Entry<Person>(Person).State = EntityState.Modified; }
public void Delete(Person Person) { _context.Person.Remove(Person); }
public void Create(Person Person) { _context.Person.Add(Person); }