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); }
public IHttpActionResult AddMajor(m_addMajor request) { try { return(Json(_AddData.addMajor(request))); } catch (Exception ex) { return(Json(ex.Message)); } }