This commit is contained in:
2018-09-05 23:13:07 +00:00
parent 0a3c927429
commit deee704135
2 changed files with 5 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
{ {
@@ -39,6 +40,7 @@ namespace AyaNova.Models
//relations //relations
//https://docs.microsoft.com/en-us/ef/core/modeling/relationships#other-relationship-patterns //https://docs.microsoft.com/en-us/ef/core/modeling/relationships#other-relationship-patterns
[JsonIgnore]
public UserOptions UserOptions { get; set; } public UserOptions UserOptions { get; set; }
} }

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using AyaNova.Biz; using AyaNova.Biz;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
{ {
@@ -19,6 +20,7 @@ namespace AyaNova.Models
//relations //relations
//https://docs.microsoft.com/en-us/ef/core/modeling/relationships#other-relationship-patterns //https://docs.microsoft.com/en-us/ef/core/modeling/relationships#other-relationship-patterns
[JsonIgnore]
public User User { get; set; } public User User { get; set; }
[Required] [Required]
public long UserId { get; set; }//will be auto-set by EF due to relationship defined public long UserId { get; set; }//will be auto-set by EF due to relationship defined