コード例 #1
0
 //[Authorize(Roles = "Admin")]
 public IHttpActionResult Delete(int id)
 {
     if (CourseDAO.Delete(id))
     {
         return(Ok());
     }
     return(BadRequest());
 }
コード例 #2
0
 public object Delete(Course info)
 {
     try
     {
         ValidateNoCourseStudentInstan(info);
         var model = info.Map();
         using (var dao = new CourseDAO())
         {
             return(dao.Delete(model));
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #3
0
        public void DeleteCourse(int id)
        {
            CourseDAO course = new CourseDAO();

            course.Delete(id);
        }
コード例 #4
0
 public static bool Delete(Guid id)
 {
     return(CourseDAO.Delete(id));
 }