Exemple #1
0
        public void Delete_Category()
        {
            CateogryDb obj    = new CateogryDb();
            bool       result = obj.Delete(2);

            Assert.AreEqual(true, result);
        }
Exemple #2
0
 public IHttpActionResult Delete(int id)
 {
     try
     {
         if (dao.Delete(id))
         {
             return(Ok("Record Deleted Successfully"));
         }
         else
         {
             return(BadRequest("Error Occurred"));
         }
     }
     catch (Exception ex)
     {
         return(BadRequest("Error Occurred"));
     }
 }