Regular Expressions 101

Community Patterns

123...6

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 - a month ago (Last modified a month ago)