IDENTITY INSERT and LINQ to SQL

后端 未结 6 1321
难免孤独
难免孤独 2020-12-03 08:04

I have a SQL Server database. This database has a table called Item. Item has a property called \"ID\". ID is the primary key on my table. This primary key is an int with a

6条回答
  •  無奈伤痛
    2020-12-03 08:42

    The simplest way is: 1. open dbml 2. Select class for inserting 3. Select column with primary-key 4. check Auto Generated Property in properties window (it should be set to True)

提交回复
热议问题