ASP.NET Identity Database
is a SQL Database project template for Visual Studio which can be used to create a custom ASP.NET Identity / Membership provider using Database First
Introduction to ASP.NET Identity
Currently it only contains a database schema for ASP.NET Identity. But looking forward it will have an optional custom ASP.NET Identity provider template project based on the Entity Framework DbFirst model, which can be easily extended and customized, plus a unit tests project for it.
How to deploy
Double-click on the .\Database\Publish Profiles\Local.publish.xml
file in Solution Explorer which should open a publishing dialog shown below and click [Publish].
Database naming conventions
The naming conventions in this project are the same used in the AdventureWorks
sample database created by Microsoft database professionals and demonstrate many best practices in terms of style.
- Object names are easily understood
- Table names are not pluralized ("User" table not "Users")
- Abbreviations are few, but allowed (i.e. Qty, Amt, etc.)
- PascalCase used exclusively with the exception of certain column names (i.e. rowguid)
- No underscores
- Certain keywords are allowed (i.e. Name)
- Stored procedures are prefaced with "usp"
- Functions are prefaced with "ufn"
- Constraints are prefixed with DF, FK, UK, IX based on their types
- Constraints contain table's name as well as a list of columns used in the constraint (i.e. PKUserUserID, UKUserUserName, DFUserCreatedDate)
Each rule has a good reasoning behind it. For example, why table names should be singular? Because this way there is less noise, such tables are easier to map to entity models using ORM tools, tables are more accurately sorted alphabetically in your IDE, table names describe the data type rather than how much data it contains, it's easier to come up with singular names, than with plural ones (with a few exceptions like News), easier to spell correctly (especially for a non-native English language programmer).
For more info visit AdventureWorks OLTP Database
Learn more about SSDT
Brought to you by Konstantin Tarkus
The source code is licensed under the Apache License 2.0. Refer to LICENSE.txt
for more information.