I have a problem programming with c#, html, using razor, in displaying all registered members name , from the default database UserProfile, i need to display UserName

    public UsersContext()  : base("DefaultConnection")
    public DbSet<UserProfile> UserProfiles { get; set; }

    public IQueryable<UserProfile> GetAll(string _UserName)
        IQueryable<UserProfile> query = this.UserProfiles.FirstOrDefault(x=>x.UserName==_UserName);
        return query;

and in the model

       using (UsersContext _UsersContext = new UsersContext())
            this.RegisterMembers = _UsersContext.UserProfiles.ToString();

in the view

Registerd members : @Model.RegisterMembers.ToString()

I am trying my best for 3 days now, and it wont work with all ways! Help plz and THANK YOU!!!

Related posts

Recent Viewed