ignore users in Json

This commit is contained in:
Paul Schneider 2016-08-03 23:25:57 +02:00
commit d82792da02
3 changed files with 7 additions and 4 deletions

View file

@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace Yavsc.Models
{
@ -16,7 +17,8 @@ namespace Yavsc.Models
public int Rate { get; set; }
public string Title { get; set; }
public string AuthorId { get; set; }
[ForeignKey("AuthorId")]
[ForeignKey("AuthorId"),JsonIgnore]
public ApplicationUser Author { set; get; }
public bool Visible { get; set; }
}