public MessagesController(ApplicationDbContext context) { _db = context; context.Messages.Add(new Message() { MessageId = Guid.NewGuid(), AuthorName = "Test Author", Body = "Hello Ag!", TimeSent = DateTimeOffset.Now }); context.SaveChanges(); }
public MessagesHub(ApplicationDbContext db) { _db = db; }