i have 2 entity framework entities can't access last entity created. i'm working 2 databases created 2 entities. 1 can access other 1 can't.
the error show are
the entity type ms_user
not part of model current context.
using (var db = new mobilekeyentities()) { //check if user exist var userdb = db.ms_user.where(n => n.userid.equals(username) && n.password.equals(password)).firstasync(); if (userdb != null) { identity.addclaim(new claim("role", "user")); } }
please tell me did wrong or need add access other entity. thank you
please make sure dbset instance in dbcontext class same.
public dbset<ms_user> ms_users{get;set;}
then query should this
var userdb = db.ms_users.where(n => n.userid.equals(username) && n.password.equals(password)).firstasync();
Comments
Post a Comment