You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

DbContextSample.cs 400 B

12345678910111213141516171819
  1. // ApplicationDbContext.cs
  2. using Microsoft.EntityFrameworkCore;
  3. public class ApplicationDbContext : DbContext
  4. {
  5. public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options)
  6. {
  7. }
  8. public DbSet<UserEntity> Users { get; set; } = null!;
  9. }
  10. // UserEntity.cs
  11. public class UserEntity
  12. {
  13. public ulong Id { get; set; }
  14. public string Name { get; set; }
  15. }