Ejemplo n.º 1
0
        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));
            }
        }
Ejemplo n.º 2
0
 public IActionResult GetListPart()
 {
     if (User.Identity.Name == null)
     {
         return(RedirectToAction("Index", "NotFound"));
     }
     else
     {
         return(View(partService.GetParts()));
     }
 }