public IActionResult PartsList() { if (User.Identity.Name == null) { return(RedirectToPage("/Identity/Account/Login")); } else { var parts = partsService.GetParts(); var partsVM = new PartsListViewModel(); partsVM.Parts = new List <Database.Models.Part>(); partsVM.Parts.AddRange(parts); return(View(partsVM)); } }
public IActionResult GetListPart() { if (User.Identity.Name == null) { return(RedirectToAction("Index", "NotFound")); } else { return(View(partService.GetParts())); } }