Windows Phone: How to exclude columns / properties in SQLite-net?

If I use SQL Server CE for a Windows phone, I can choose which class map properties for the database tables. This allows me to have abstract properties in the class.

eg

[Table] public class MyClass { // this property is written to the database private int _ItemId; [Column(IsPrimaryKey = true, IsDbGenerated = true, DbType = "INT NOT NULL Identity", CanBeNull = false, AutoSync = AutoSync.OnInsert)] public int ItemId { get { return _ItemId; } set { _ItemId = value; } } // abstract class. obviously this just an example. the real code checks for 11. =) // under SQLite, it looks like this will get stored in the db? public bool IsItemIdSeven { get{ return _ItemId == 7; } } } 

Is it possible to exclude properties from a class definition in SQLite-net? I cannot use extensions because some of these properties are used by the UI application.

+6
source share
1 answer

If you are using SQLite-net , you can use the [Ignore] attribute

+13
source

Source: https://habr.com/ru/post/950839/


All Articles