示例#1
0
 public ActionResult Index()
 {
     if (User.IsInRole("Admin"))
     {
         return(View(db.Services.ToList()));
     }
     else
     {
         var servicesList = ModelTools.GetServicesFromUserID(User.Identity.GetUserId());
         servicesList = ModelTools.AddEmptyOfferings(servicesList);
         return(View(servicesList));
     }
 }