User posts backend.

This commit is contained in:
Michael 2017-03-23 18:53:14 -04:00
parent 92f7019269
commit 2dcb12403b

View file

@ -39,7 +39,6 @@ public Role HighestRole
}
public string LastKnownIPAddress { get; set; }
public DateTime JoinedAt { get; set; }
public DateTime LastLogin { get; set; }
@ -91,7 +90,14 @@ public int TopicCount
public string Hobbies { get; set; }
public UserPost[] Posts
{
get
{
var db = new ApplicationDbContext();
return db.UserPosts.Where(x => x.UserId == this.Id).ToArray();
}
}
}
public class BannedIP
@ -118,6 +124,7 @@ public static ApplicationDbContext Create()
return new ApplicationDbContext();
}
public DbSet<UserPost> UserPosts { get; set; }
public DbSet<ForumPostEdit> ForumPostEdits { get; set; }
public DbSet<Like> Likes { get; set; }
public DbSet<ForumPermission> ForumPermissions { get; set; }