Skip to content

Instantly share code, notes, and snippets.

@rowanmiller
Last active August 27, 2017 23:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rowanmiller/88261afd0baae7fb9b04 to your computer and use it in GitHub Desktop.
Save rowanmiller/88261afd0baae7fb9b04 to your computer and use it in GitHub Desktop.
EF7 | Pluralizing table names
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
foreach (var entity in modelBuilder.Model.GetEntityTypes())
{
modelBuilder.Entity(entity.Name).ToTable(entity.Name + "s");
}
}
@Mahmoudsaeed111
Copy link

How can i make favorite component with angular 2

@bradykelly
Copy link

Just adding an 's' to pluralize a name is such a piss poor attempt at doing anything, why bother at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment