public Task <HttpResponseMessage> Delete(int id)
        {
            var command = new DeletePhoneCompanyCommand(
                idPhoneCompany: id
                );

            var phone = _service.Delete(command);

            return(CreateResponse(HttpStatusCode.OK, phone));
        }
Beispiel #2
0
        public PhoneCompany Delete(DeletePhoneCompanyCommand command)
        {
            var phone = _repository.GetById(command.IdPhoneCompany);

            _repository.Delete(phone);

            if (Commit())
            {
                return(phone);
            }

            return(null);
        }
 public void Delete(DeletePhoneCompanyCommand command)
 {
     this.IdPhoneCompany = command.IdPhoneCompany;
 }