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();
 }
Beispiel #2
0
 public MessagesHub(ApplicationDbContext db)
 {
     _db = db;
 }