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

Problem with ApplicationUser in _loginpartial.cshtml view

$
0
0

I'm trying to create a VS2015 solution which includes project that just contains the model classes.  This model class project is referenced by both an ASP.Net Core web application and an API project in the same solution.  In the _LoginPartial.cshtml view of the web application, I am getting 'Type or namespace name ApplicationUser could not be found'.  ApplicationUser is defined in ApplicationDBContext.cs in my model class project and I am referencing that namespace (@using SP_Common_Classes.Models.DB) in the view (and the namespace in ApplicationDBContext is SP_Common_Classes.Models.DB).  The API also doesn't return anything, but I haven't looked into that further and am trying to figure out the web application.

...

namespace SP_Common_Classes.Models.DB
{
    public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
    {
        public class ApplicationUser : IdentityUser
        {
        }
        public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
            : base(options)
        {
        }

...

Any suggestions as to what else I need to look for?

Mark Lindahl


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>