Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

EF Core database

$
0
0

hat's how I try to follow this article / guide on how to add the database to Azure DB.

That's the way I have a database at Azure, but Right now, my Dbset will not get hold of "User".

https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/new-db

How can it be?

namespace WebsiteSiteNameDB2018Core.Models.DB
{
    public class SiteNameDB: DbContext
    {

        public SiteNameDB(DbContextOptions<SiteNameDB> options) : base(options)
        { }

        public DbSet<User> User { get; set; }

    }
}

Error with: "DbSet" say Property type

Appsettings.json.

{"ConnectionStrings":{"MvcMovieContext":"Server=tcp:Text.database.windows.net,1433;Initial Catalog=xxxxxxxxxxxx;Persist Security Info=False;User ID=xxxxxxxxxxxxxx;Password=xxxxxxxxx;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"},"Logging":{"IncludeScopes":false,"LogLevel":{"Default":"Warning"}}}

How can I fix it?


Viewing all articles
Browse latest Browse all 9386

Trending Articles