TrackableEntities / EntityFrameworkCore.Scaffolding.Handlebars

Scaffold EF Core models using Handlebars templates.
MIT License
209 stars 53 forks source link

Duplicate import directives when entity has several relationships to the same entity. #63

Closed omatrot closed 5 years ago

omatrot commented 5 years ago

I have several tables in my database that with several foreign keys to the same table. The generated Typesript entity then has the same entity imported several times.

tonysneed commented 5 years ago

This should be resolved by my answer to #3, part 2, with the SetRefCycleDetection setting in Dcerialize.

omatrot commented 5 years ago

I should have provided some code, sorry.

I meant several identical import directives at the begining of the generated TS files:

import { Vehicle } from './Vehicle';
import { Vehicle } from './Vehicle';
tonysneed commented 5 years ago

@omatrot Can you please move this over to EntityFrameworkCore.Scaffolding.Handlebars, and I'll address it there?

Nevermind ... I can transfer the issues there.

tonysneed commented 5 years ago

I should be able to fix this.