public Form GetForm(string formCode) { var form = _context.Set <Form>().AsNoTracking() .Include(x => x.FormConfigurations) .Include(x => x.FormConfigurations).ThenInclude(x => x.ControlType) .Include(x => x.FormConfigurations).ThenInclude(x => x.FormField) .Include(x => x.FormFieldBranchings).ThenInclude(x => x.ParentField) .FirstOrDefault(x => x.Code == formCode); return(form); }
public Repository(FormGeneratorDbContext context) { _context = context; DbSet = context.Set <T>(); }