示例#1
0
 public void OnGet(string name, string login)
 {
     if (login == null)
     {
         recipes = _service.GetAll().Where(recipes => recipes.type.Name == name);
         types   = _typesService.GetAll();
     }
     else
     {
         recipes = _service.GetAll().Where(recipes => recipes.type.Name == name);
         types   = _typesService.GetAll();
         user    = _userService.GetByLogin(login);
     }
 }
 public void OnGet(Guid id, string login)
 {
     if (login == null)
     {
         recipe_Ingredient  = _serviceR.Get(id);
         recipe_Ingredients = _serviceR_I.GetAll();
         recipe_Types       = _TypeService.GetAll();
     }
     else
     {
         recipe_Ingredient  = _serviceR.Get(id);
         recipe_Ingredients = _serviceR_I.GetAll();
         recipe_Types       = _TypeService.GetAll();
         user = _userService.GetByLogin(login);
     }
 }