Is it possible to Query the AspNetUsers table based on the keyword using N-Tier design modeled after:
Implementing a generic data access layer using Entity Framework
I created the following Interfaces in my DAL:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Library.Model; namespace Library.DataAccessLayer { ... public interface IAspNetUserRepository : IGenericDataRepository<ApplicationUser> { } public class AspNetUserRepository : GenericDataRepository<ApplicationUser>, IAspNetUserRepository { } } And the Following BLL entry:
using System; using System.Collections.Generic; using System.Linq; using Library.DataAccessLayer; using Library.Model; namespace Library.BusinessLogicLayer { public interface IBusinessLogicLayer_AspNetUser { ApplicationUser GetAspNetUserByAspNetUserID(string _UserID); } public class BusinessLogicLayer_AspNetUser : IBusinessLogicLayer_AspNetUser { private readonly IAspNetUserRepository _AspNetUserRepository; public BusinessLogicLayer_AspNetUser() { _AspNetUserRepository = new AspNetUserRepository(); } public BusinessLogicLayer_AspNetUser(IAspNetUserRepository AspNetUserRepository) { _AspNetUserRepository = AspNetUserRepository; } public ApplicationUser GetAspNetUserByAspNetUserID(string _UserID) { return _AspNetUserRepository.GetSingle(u => u.Id.Equals(_UserID)); } } } Now in the BLL file, the only Lambda expression does not contain Td so it errors out.
What is the correct model to use. The only information I can find is that ApplicationUser inherits Identity User.
What needs to be done or changed so I can get these fields added to the ApplicationUser model without it affecting the Code First portion for the database?