Exemplo n.º 1
0
        public IActionResult DeleteSecurityInformation(FarmerSecurityInformationDTO farmerSecurityInformationDTO)
        {
            var result = _securityInformationService.GetById(farmerSecurityInformationDTO.Id);

            if (result == null)
            {
                throw new ArgumentNullException($"{farmerSecurityInformationDTO.Id} id'sine sahip data bulunamadı !!!");
            }

            _securityInformationService.Delete(_mapper.Map <FarmerSecurityInformation>(farmerSecurityInformationDTO));
            return(Ok());
        }
Exemplo n.º 2
0
 public IActionResult CreateSecurityInformation(FarmerSecurityInformationDTO farmerSecurityInformationDTO)
 {
     _securityInformationService.Create(_mapper.Map <FarmerSecurityInformation>(farmerSecurityInformationDTO));
     return(Ok());
 }