public IEnumerable <Category> GetAllCategories() { using (var context = new SoftProEntites()) { IEnumerable <Category> items = context.Category.ToList(); return(items); } }
// // GET: /Category/ public ActionResult Index() { using (var context = new SoftProEntites()) { List <Category> result = context.Category.Include("SkillSet").ToList(); return(View(result)); } }
private List <sp_AnalyseSkillSetForTextualInfo_Result> FetchReport(string CVtextualInfo) { using (var context = new SoftProEntites()) { var result = context.sp_AnalyseSkillSetForTextualInfo(CVtextualInfo).ToList(); return(result); } }
private CVInfo AddCVInfo(CVInfo cv) { using (var context = new SoftProEntites()) { var cvinfo = context.CVInfo.Add(cv); context.SaveChanges(); return(cvinfo); } }
public ActionResult AddCategory(Category model) { using (var context = new SoftProEntites()) { context.Category.Add(model); context.SaveChanges(); } return(View(model)); }
private Customer AddCustomer(CustomerModel model) { using (var context = new SoftProEntites()) { Customer cust = new Customer(); cust.EmailId = model.EmailId; cust.PasswordHash = model.PasswordHash; cust.SaltKey = model.SaltKey; cust.Username = model.Username; var customer = context.Customer.Add(cust); context.SaveChanges(); return(customer); } }
private CVInfo GetCvINfoByCustomerId(int?id) { using (var context = new SoftProEntites()) { if (id.HasValue) { return(context.CVInfo.Where(cv => cv.CustomerId == id.Value).FirstOrDefault()); } else { return(null); } } }
public ActionResult AddNewSkills(SkillModel model) { if (ModelState.IsValid) { using (var context = new SoftProEntites()) { int categoryID = Convert.ToInt16(model.CategoryID); context.sp_CreateNewSkillSet(categoryID, null, null, model.Skill_name, model.Skill_description, model.Skill_rating.ToString()); } return(RedirectToAction("Index", "Category")); } else { ModelState.AddModelError("", "Please correct your inputs."); return(View(model)); } }