public void DeleteUser(UserDto user) { try { var userEntity = new User { Id = user.Id, Password = _encodingService.CalculateSHA256(user.Password), Name = user.Name, PlaneModels = _mapper.Map <ICollection <PlaneModel> >(user.PlaneModels), RegistrationDate = user.RegistrationDate, Role = user.Role }; _unit.Users.DeleteUser(userEntity); } catch { //catch just not to stop the program } }