Windows ストア アプリの分離ストレージに SQLite データベースがあります。私が使うSQLite for Windows Runtime
私のクラス:
[Table("Projects")]
public class Project
{
[PrimaryKey]
[Column ("id")]
public int Id { get; set; }
[Column("group_id")]
public int GroupId { get; set; }
public string Name { get; set; }
}
Web サーバーからデータを取得し、 local に配置しますDataBase。にデータを保存しようとするとDataBase、例外が処理されました
e.message = table Projects has no column named Name
DataBase「名前」列がないため
私の質問は次のとおりです。フィールド、マッピング、DataBase Columnおよび単純なフィールドで1つのクラスを使用する方法は? (いくつかのフィールドを に含めませんがDataBase、クラスで必要です。)
アップデート。
using System.ComponentModel.DataAnnotations.Schema;
[NotMapped]
public string Name { get; set; }
Error The type or namespace name 'NotMappedAttribute' does not exist in the namespace 'System.ComponentModel.DataAnnotations.Schema' (are you missing an assembly reference?)
System.ComponentModel.DataAnnotations.dllError:を追加しようとするとSystem.ComponentModel.DataAnnotations.dll could not be added. This component is already automaticaly referenced by the build system。