Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public Repository(FormGeneratorDbContext context)
 {
     _context = context;
     DbSet    = context.Set <T>();
 }