File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -146,20 +146,11 @@ var orders = mapper.MapToDto(dbContext.Orders).ToList();
146146
147147** Example:**
148148``` csharp
149- // Define entity with attributes
150- public class Order
151- {
152- public int Id { get ; set ; }
153-
154- [Include ]
155- public string CustomerName { get ; set ; }
156-
157- [Exclude ]
158- public string InternalField { get ; set ; }
149+ [Facet (typeof (OrderChild ), exclude = " OrderChildId" )]
150+ public partial record OrderChildFacet ;
159151
160- [NestedFacets ]
161- public List <OrderItem > Items { get ; set ; }
162- }
152+ [Facet (typeof (Order ), NestedFacets = [typeof (OrderChildDto )]
153+ public partial record OrderFacet ;
163154
164155// Use ToFacetsAsync
165156var orders = await dbContext .Orders .ToFacetsAsync <OrderFacet >();
You can’t perform that action at this time.
0 commit comments