Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate name for table with SetNaming extension method #21

Closed
hherzl opened this issue Jan 4, 2023 · 0 comments
Closed

Validate name for table with SetNaming extension method #21

hherzl opened this issue Jan 4, 2023 · 0 comments
Assignees
Labels

Comments

@hherzl
Copy link
Owner

hherzl commented Jan 4, 2023

Validate the table name with SetNaming extension method, avoid duplicated tables in database.

Example:

// First entity
var category = db
    .DefineEntity(new
    {
        Id = 0,
        Name = ""
    })
    .SetNaming("Category")
    ;

// Second entity
var product = db
    .DefineEntity(new
    {
        Id = 0,
        Name = "",
        CategoryId = 0
    })
    .SetNaming("Category") // The 'Category' entity already exists in db instance
    ;
@hherzl hherzl self-assigned this Jan 4, 2023
@hherzl hherzl added the bug label Jan 4, 2023
hherzl added a commit that referenced this issue Jan 7, 2023
      Upgrade for .NET 6
      Fix issue 21: #21

      Usage:

      var database = await SqlServerDatabaseFactory.ImportAsync("Your connection string!");

      Wiki: https://github.com/hherzl/CatFactory.SqlServer/wiki
hherzl added a commit that referenced this issue Jan 7, 2023
      Upgrade for .NET 6
      Fix issue 21: #21
      Fix issue 20: #20

      Usage:

      var database = await SqlServerDatabaseFactory.ImportAsync("Your connection string!");

      Wiki: https://github.com/hherzl/CatFactory.SqlServer/wiki
hherzl added a commit that referenced this issue Jan 7, 2023
      Upgrade for .NET 6
      Fix issue 20: #20
      Fix issue 21: #21
      Fix issue 22: #22

      Usage:

      var database = await SqlServerDatabaseFactory.ImportAsync("Your connection string!");

      Wiki: https://github.com/hherzl/CatFactory.SqlServer/wiki
@hherzl hherzl closed this as completed Feb 21, 2023
hherzl added a commit that referenced this issue Feb 27, 2023
      Upgrade for .NET 6
      Fix issue 20: #20
      Fix issue 21: #21
      Fix issue 22: #22
      Fix issue 23: #23
      Fix issue 24: #24

      Usage:

      var database = await SqlServerDatabaseFactory.ImportAsync("Your connection string!");

      Wiki: https://github.com/hherzl/CatFactory.SqlServer/wiki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant