3900-MyRecipes-backup / Server / Data / ApplicationDbContext.cs
ApplicationDbContext.cs
Raw
using IdentityServer4.EntityFramework.Options;
using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using MyRecipes2.Server.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace MyRecipes2.Server.Data
{
    public class ApplicationDbContext : ApiAuthorizationDbContext<ApplicationUser>
    {
        public ApplicationDbContext(
            DbContextOptions options,
            IOptions<OperationalStoreOptions> operationalStoreOptions) : base(options, operationalStoreOptions)
        {
        }

        public DbSet<Recipe> Recipes { get; set; }

        public DbSet<Comment> Comments { get; set; }

        public DbSet<Like> Likes { get; set; }

        public DbSet<Image> Images { get; set; }

        public DbSet<MethodStep> MethodSteps { get; set; }

        public DbSet<Ingredient> Ingredients { get; set; }

        public DbSet<Subscription> Subscriptions { get; set; }

        public DbSet<MealType> MealTypes { get; set; }
    }
}