【发布时间】:2019-11-23 11:10:27
【问题描述】:
我在实体模型中使用一些属性来维护关系,我使用[Ignore] 来忽略表中的该属性。
public class User : IdentityUser<Guid>
{
[Ignore]
public string Password { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string CommonName { get; set; }
public string ProfilePhoto { get; set; }
public bool IsDeleted { get; set; }
[Ignore]
public virtual ICollection<UserRole> UserRoles { get; set; }
}
var User = new Table<User>(dataSession);
User.CreateIfNotExists();
当我尝试使用上面的代码创建时,我得到了错误。
问题:我是否使用了错误的脚本来创建表格或错误的忽略方式?
提前致谢
【问题讨论】:
标签: c# cassandra cassandra-3.0