public async Task <IActionResult> CreateUrl(CreateUrlViewModel model) { var user = await userManager.FindByNameAsync(User.Identity.Name); if (ModelState.IsValid) { LHUrl lHUrl = new LHUrl() { UrlTitle = model.UrlTitle, LHUrlName = model.LHUrlName, Description = model.Description, CategoryId = model.CategoryId, IsApproved = false, Id = user.Id }; LHUrlBs.Create(lHUrl); return(RedirectToAction("CreateUrl")); } ViewBag.Categories = CategoryBs.GetAll(); return(View()); }
public bool Update(LHUrl LHUrl) { LHDbContext.Update <LHUrl>(LHUrl); LHDbContext.SaveChanges(); return(true); }
public bool Create(LHUrl LHUrl) { LHDbContext.Add(LHUrl); LHDbContext.SaveChanges(); return(true); }
public bool Update(LHUrl LHUrl) { return(LHUrlDb.Update(LHUrl)); }
public bool Create(LHUrl LHUrl) { return(LHUrlDb.Create(LHUrl)); }