public MenuRightViewComponent(BlogCoreContext context) { _context = context; }
public LoginController(BlogCoreContext context) { _context = context; }
public PostController(BlogCoreContext context) { _context = context; }
public CategoryController(BlogCoreContext context) { _context = context; }
public static void SeedForTests(BlogCoreContext context) { context.Authors.Add(new Author { FirstName = "David", LastName = "Lebee", Posts = new List <Post>() { new Post() { CreateTime = DateTimeOffset.Now, PublishTime = DateTimeOffset.Now, Title = "New project", Content = "Lots of good things coming", Comments = new List <Comment>() { new Comment() { DisplayName = "John Doe", Email = "*****@*****.**", CommentText = "Very interesting", }, new Comment() { DisplayName = "Nice Guy", Email = "*****@*****.**", CommentText = "Best of luck!" } } }, new Post() { CreateTime = DateTimeOffset.Now, PublishTime = null, Title = "The future!", Content = "Is Near" } } }); context.Authors.Add(new Author { FirstName = "Some", LastName = "Dude", Posts = new List <Post>() { new Post() { CreateTime = DateTimeOffset.Now, PublishTime = DateTimeOffset.Now, Title = "The One", Content = "And Only" }, new Post() { CreateTime = DateTimeOffset.Now, PublishTime = DateTimeOffset.Now, Title = "The Two", Content = "And Second" } } }); context.SaveChanges(); }
public UsersController(BlogCoreContext context) { _context = context; }
public HomeController(ILogger <HomeController> logger, BlogCoreContext context) { _logger = logger; _context = context; }