Beispiel #1
0
        public bool DeleteDesignation(int id)
        {
            bool isSuccess   = true;
            var  designation = designationRepository.GetById(id);

            try
            {
                designationRepository.Delete(designation);
                SaveRecord();
                ServiceUtil <Designation> .WriteActionLog(id, ENUMOperation.DELETE);
            }
            catch (Exception ex)
            {
                isSuccess = false;
                logger.Error("Error in deleting Designation", ex);
            }
            return(isSuccess);
        }
        public async Task <IActionResult> GetById(DesignationInformation designationInformation)
        {
            try
            {
                var designation = await _repository.GetById(designationInformation.Id);

                return(Ok(designation));
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #3
0
 public Designation GetById(long id)
 {
     return(_designationRepository.GetById(id));
 }
Beispiel #4
0
        public Designation GetById(int id)
        {
            var entity = repository.GetById(id);

            return(entity);
        }