之前用DBLinq想在sqlite环境使用LINQ to SQL, 但一直有错误(DataContext.SubmitChanges()遇到一个exception)
昨天用了sql server后便成功了.
mysql中primary key auto_increment对应sql server中的identity.
在model class中要对主键属性设置ColumnAttribute的isPrimaryKey为true, 还需要设置isDbGenerated为true, 对应auto_increment
本文讨论了使用LINQ to SQL在SQLite环境中遇到的问题及解决方案,对比了SqlServer环境下的实现,并介绍了如何正确配置主键属性。
863

被折叠的 条评论
为什么被折叠?



