//Using SqlServer
Create table tbl_UniqueIds
(
ID int identity(4000,1)
)
insert into tbl_UniqueIds DEFAULT VALUES
=======================================
//Using Linq c#
public static int CreateSysUniqueId(short tableId)
{
using (var entity = new EmployeeDataEntities())
{
var res = new tbl_UniqueIds
{
};
entity.tbl_UniqueIds.Add(res);
entity.SaveChanges();
return res.ID;
}
}
No comments:
Post a Comment