public ActionResult <int> Post([FromBody] Compaign compaign) { try { return(_IDeleteCampaign.Delete(compaign)); } catch (Exception ex) { return(BadRequest("{\"error\":\"" + ex.Message + "")); } }
public void Test1() { CreateService(); var compaing = new Compaign { IdCompaign = 1, IdUser = "******", NumberOfRecipients = 2, Status = true, Subject = "Asunto", DateCreated = DateTime.Now }; var value = _ICampaign.Delete(compaing); Assert.True(value > 0, "The value greater than 0"); }