如何将UWP应用中的SQLite数据库列分配默认字符串值?
因此,我有一个与数据库通信的UWP,我有一个具有列名称位置的表。我想在每次创建AA行时分配一个默认值。
我在数据库中创建列的方式是
//travel is a table name. id and location is a column in that table
public class travel
{
public int id { get; set; }
public string location{get; set;}
}
So i've a UWP which communicates with a database, i've a table which has a column names location. I want to assign a default value to that every time a a row is created.
The way i've created columns in the database is
//travel is a table name. id and location is a column in that table
public class travel
{
public int id { get; set; }
public string location{get; set;}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以这样做:
You can do it like this: