Beispiel #1
0
 public async Task <IActionResult> DetailsDeveloper(int?id)
 {
     if (id != null)
     {
         Developer developer = developerRepository.Get(id);
         if (developer != null)
         {
             return(View(developer));
         }
     }
     return(NotFound());
 }
        public bool Delete(int id)
        {
            if (_appointmentRepository.FindByQuery(x => x.DeveloperID == id).Any())
            {
                return(false);
            }

            var data = _developerRepository.Get(id);

            _developerRepository.Delete(data);

            return(true);
        }
        public override bool Insert(Appointment entity)
        {
            if (_projectRepository.Get(entity.ProjectID) == null)
            {
                return(false);
            }

            if (_developerRepository.Get(entity.DeveloperID) == null)
            {
                return(false);
            }

            return(base.Insert(entity));
        }
Beispiel #4
0
        public DeveloperDTO GetById(int Id)
        {
            DeveloperDTO retour = new DeveloperDTO();
            Developer    objet  = _repo.Get(Id);

            retour = MapDeveloperDTO.ToDto(objet);
            return(retour);
        }
Beispiel #5
0
        protected virtual Task <IEnumerable <Developer> > GetSetOrAll(DeveloperFilterModel filter)
        {
            if (filter.Set.Value == DeveloperSet.Associated)
            {
                return(_developerRepo.GetAssignedTo(
                           projName: Decode(filter.ProjectContextUrl),
                           keywords: filter.Keywords,
                           order: filter.GetOrderModel()));
            }

            if (filter.Set.Value == DeveloperSet.NonAssociated)
            {
                return(_developerRepo.GetAssignableTo(
                           projName: Decode(filter.ProjectContextUrl),
                           keywords: filter.Keywords,
                           order: filter.GetOrderModel()));
            }

            return(_developerRepo.Get(filter.Keywords, filter.GetOrderModel()));
        }