From c07b8cfd6556f64f5d84094f6f8e3823823d8252 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 23 Sep 2016 12:32:57 +0200 Subject: [PATCH] WIP Chat PV --- Yavsc/Model/ApplicationDbContext.cs | 2 +- Yavsc/Model/Relationship/Contact.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Yavsc/Model/ApplicationDbContext.cs b/Yavsc/Model/ApplicationDbContext.cs index e0cd5194..02acf328 100644 --- a/Yavsc/Model/ApplicationDbContext.cs +++ b/Yavsc/Model/ApplicationDbContext.cs @@ -181,6 +181,6 @@ namespace Yavsc.Models public DbSet EstimateTemplates { get; set; } - + public DbSet Contacts { get; set; } } } diff --git a/Yavsc/Model/Relationship/Contact.cs b/Yavsc/Model/Relationship/Contact.cs index ac845e7d..0dea2092 100644 --- a/Yavsc/Model/Relationship/Contact.cs +++ b/Yavsc/Model/Relationship/Contact.cs @@ -12,7 +12,10 @@ namespace Yavsc.Models [Required()] public string OwnerId { get; set; } - [ForeignKeyAttribute("OwnerId"),JsonIgnore] + [ForeignKeyAttribute("OwnerId"),NotMapped] public virtual ApplicationUser Owner { get; set; } + + [ForeignKeyAttribute("UserId"),NotMapped] + public virtual ApplicationUser User { get; set; } } }