Exemple #1
0
        public bool addUniversity(m_addUniversity value)
        {
            var res = db.Database.ExecuteSqlCommand("EXEC [quickquiz].[s_addUniversity] @FullWord,@Abbreviation",
                                                    new SqlParameter("@FullWord", value.FullWord),
                                                    new SqlParameter("@Abbreviation", value.Abbreviation)
                                                    );

            return(res > 0 ? true : false);
        }
Exemple #2
0
 public IHttpActionResult AddUniversity(m_addUniversity request)
 {
     try
     {
         return(Json(_AddData.addUniversity(request)));
     }
     catch (Exception ex) {
         return(Json(ex.Message));
     }
 }