Esempio n. 1
0
 public ActionResult <int> Post([FromBody] Compaign compaign)
 {
     try
     {
         return(_IDeleteCampaign.Delete(compaign));
     }
     catch (Exception ex)
     {
         return(BadRequest("{\"error\":\"" + ex.Message + ""));
     }
 }
Esempio n. 2
0
        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");
        }