Пример #1
0
 public IEnumerable <Category> GetAllCategories()
 {
     using (var context = new SoftProEntites())
     {
         IEnumerable <Category> items = context.Category.ToList();
         return(items);
     }
 }
Пример #2
0
 //
 // GET: /Category/
 public ActionResult Index()
 {
     using (var context = new SoftProEntites())
     {
         List <Category> result = context.Category.Include("SkillSet").ToList();
         return(View(result));
     }
 }
Пример #3
0
 private List <sp_AnalyseSkillSetForTextualInfo_Result> FetchReport(string CVtextualInfo)
 {
     using (var context = new SoftProEntites())
     {
         var result = context.sp_AnalyseSkillSetForTextualInfo(CVtextualInfo).ToList();
         return(result);
     }
 }
Пример #4
0
 private CVInfo AddCVInfo(CVInfo cv)
 {
     using (var context = new SoftProEntites())
     {
         var cvinfo = context.CVInfo.Add(cv);
         context.SaveChanges();
         return(cvinfo);
     }
 }
Пример #5
0
 public ActionResult AddCategory(Category model)
 {
     using (var context = new SoftProEntites())
     {
         context.Category.Add(model);
         context.SaveChanges();
     }
     return(View(model));
 }
Пример #6
0
 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);
     }
 }
Пример #7
0
 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);
         }
     }
 }
Пример #8
0
 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));
     }
 }