public void Register(UserRegistrationModel userRegistrationModel) { var user = _mapper.Map <User>(userRegistrationModel); user.UserType = 2; _capstoneContext.Add(user); }
public async Task <IActionResult> Create([Bind("Id,Name")] UserType userType) { if (ModelState.IsValid) { _context.Add(userType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(userType)); }
public async Task <IActionResult> Create([Bind("Id,Name,Description")] Category category) { if (ModelState.IsValid) { _context.Add(category); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(category)); }
public void Save(Category category) { _capstoneContext.Add(category); }
public void Save(Store store) { _capstoneContext.Add(store); }
public void Save(Products products) { _capstoneContext.Add(products); }