24 lines
793 B
C#
24 lines
793 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace ApiPolo.Models
|
|
{
|
|
/// <summary>TokenDbContext</summary>
|
|
public class TokenDbContext : DbContext
|
|
{
|
|
/// <summary>conf</summary>
|
|
public DbSet<Token>? tok { get; set; }
|
|
|
|
/// <summary>ConfigurazioniDbContext</summary>
|
|
public TokenDbContext(DbContextOptions<TokenDbContext> options) : base(options)
|
|
{
|
|
}
|
|
/// <summary>OnModelCreating</summary>
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.Entity<Token>().ToTable("Token");
|
|
//modelBuilder.Entity<Token>().Property(p => p.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
|
|
}
|
|
}
|
|
}
|