public virtual IActionResult ApiTechnicalContactsDelete([FromBody] TechnicalContact techCont) { try { var techContGet = _datastore.ById(techCont.Id.ToString()); if (techContGet.Id == Guid.Empty) { return(StatusCode(404)); } _datastore.Delete(techCont); } catch (Crm.CrmApiException ex) { return(StatusCode((int)ex.HttpStatus, ex.Message)); } return(StatusCode(200)); }
public void Delete(TechnicalContacts techCont) { _validator.ValidateAndThrowEx(techCont, ruleSet: nameof(ITechnicalContactsLogic.Delete)); _datastore.Delete(techCont); }