悬赏园豆:15
[已关闭问题]
<P>当 IDENTITY_INSERT 设置为 OFF 时,不能为表 'NEWS' 中的标识列插入显式值。</P>
<P>string constr = @"Data Source=localhost;Initial Catalog=Mylinq;Integrated Security=True";<BR> Mylinq db = new Mylinq(constr);<BR> NEWS msg = new NEWS();<BR> msg.AddTime = DateTime.Now;<BR> msg.Title = "Welcome TO CHINA";<BR> msg.Content = "欢迎来到CHINA";<BR> db.NEWS.InsertOnSubmit(msg);<BR> db.SubmitChanges();</P>
<P>有个msg.ID属性是主键,表示为 Identity(1,1) 请问linq如何插入值?</P>