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

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