public int UpdateMarks(Marks marks)
 {
     using (var db = DbConnectionFactory.OpenDbConnection())
     {
         return(db.Update(marks));
     }
 }
 public int AddMarks(Marks marks)
 {
     using (var db = DbConnectionFactory.OpenDbConnection())
     {
         db.Insert(marks);
         return((int)db.LastInsertId());
     }
 }