diff options
| author | Michael <[email protected]> | 2017-03-23 18:53:14 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-03-23 18:53:14 -0400 |
| commit | 2dcb12403b1f9b6d5a2625e604c78caac8c17dbf (patch) | |
| tree | 58ae7c04e0ffaa5eb8cc27a7503c820ccbd3445a /Project-Unite | |
| parent | 92f7019269f2adc041caba08a497ad2b9f93225b (diff) | |
| download | project-unite-2dcb12403b1f9b6d5a2625e604c78caac8c17dbf.tar.gz project-unite-2dcb12403b1f9b6d5a2625e604c78caac8c17dbf.tar.bz2 project-unite-2dcb12403b1f9b6d5a2625e604c78caac8c17dbf.zip | |
User posts backend.
Diffstat (limited to 'Project-Unite')
| -rw-r--r-- | Project-Unite/Models/IdentityModels.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Project-Unite/Models/IdentityModels.cs b/Project-Unite/Models/IdentityModels.cs index 71b12b9..8d368ed 100644 --- a/Project-Unite/Models/IdentityModels.cs +++ b/Project-Unite/Models/IdentityModels.cs @@ -39,7 +39,6 @@ namespace Project_Unite.Models } public string LastKnownIPAddress { get; set; } - public DateTime JoinedAt { get; set; } public DateTime LastLogin { get; set; } @@ -91,7 +90,14 @@ namespace Project_Unite.Models 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 @@ namespace Project_Unite.Models 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; } |
