コード例 #1
0
        public ToDoRepository(IWebHostEnvironment environment, ToDoContext context)
        {
            this.context = context;
            string filePath = Path.Combine(environment.ContentRootPath, "Repository\\todos.json");

            context.EnsureInitialToDoAsync(filePath).GetAwaiter().GetResult();
        }