is possible use id other primary key identify database records in asp.net mvc?
we're looking @ updating old system .net, , original database structure has 2 ids: sqlid , page id. @ moment, website pages called database based on page id, don't change if database migrated etc, whilst sqlid can change , when needed based on database migrations , such.
so, question is, when doing edit action example, rather clicking "edit" in table , id uses find record being primary key, there way based on column?
thanks
if understand question, want sort database key. can going keys property of table, , selecting other column primary key. take care ensure new primary key unique though. if query on same table after changing primary key should see sorted new key. hope helps. don't think there changes if backup , restore database, depend on internal dependencies (constraints) between table , other tables. haven't tested careful - don't want break database test theory :)
Comments
Post a Comment