Answers for "dotnet DB context class"

C#
0

dotnet DB context class

using Microsoft.EntityFrameworkCore;
using Pantry.Models;

namespace Pantry
{
    public class AppDbContext : DbContext
    {
        public DbSet<Product> Products { get; set; }
        public DbSet<ImageLocation> ImageLocations { get; set; }
        public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
        {
        }
    }
}
Posted by: Guest on July-22-2021

C# Answers by Framework

Browse Popular Code Answers by Language