Regular Expressions 101

Community Patterns

Entity framework mappers

1

Regular Expression
.NET 7.0 (C#)

@"
modelBuilder\.Entity<(?'type'\w+)>\(builder =>\n\s*\{(?'builder'[\w\W]+?)\}\);
"
gm

Description

This expression converts a modelbuilder to an IEntityTypeConfiguration<T> class. Useful for tidying up the result of a scaffold operation.

Submitted by MK - 12 days ago (Last modified 12 days ago)