コード例 #1
0
        public async Task <IActionResult> Index()
        {
            var repo = new RecipesRepo();

            //var item = new RecipesDTO
            //{
            //    ID = 0,
            //    Body = "Coś",
            //    Name = "Nazwa",
            //    Category = null,
            //    CategoryId = null,
            //    Image = null
            //};
            //await repo.Add(item);
            //var x = await repo.Get(2);
            return(View());
        }
コード例 #2
0
ファイル: Index.cshtml.cs プロジェクト: jswashburn/RecipePal
 public void OnGet(int id)
 {
     Cookbook = CookbooksRepo.Get(id);
     Recipes  = RecipesRepo.Get().Where(r => r.CookbookId == Cookbook.Id);
 }