Adding full DI navigation example for testing purposes.
- adding internal private field into FormBase class - adding Extension methods into DependencyInjection namespace for use - adding 2 NavigateTo extension methods for DI using ServiceProvider - adding example project - adding to readme as example
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DependencyInjection.Database;
|
||||
|
||||
public class BotDbContext : DbContext
|
||||
{
|
||||
public BotDbContext(DbContextOptions options) : base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public DbSet<User> Users { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace DependencyInjection.Database;
|
||||
|
||||
public class User
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string LastMessage { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user