Пример #1
0
        public FormRepository(IOptions <ConnectionStringsOptions> connectionStrings, IQueryGenerator queryGenerator)
            : base(connectionStrings.Value.Vendora)
        {
            _queryFactory = queryGenerator.GetFactory <Form>();

            _queryLanguage        = _queryFactory.GetColumnProperty(" = @", nameof(Form.Language));
            _queryName            = _queryFactory.GetColumnProperty(" = @", nameof(Form.Name));
            _queryOrderByCreation = $"ORDER BY {_queryFactory.GetColumn(nameof(Form.CreatedDate))}";

            SqlMapper.AddTypeHandler(typeof(FormMetadata), new JsonTypeHandler());
        }
Пример #2
0
 public ProfileRepository(IOptions <ConnectionStringsOptions> connectionStrings, IQueryGenerator queryGenerator)
     : base(connectionStrings.Value.Vendora)
 {
     _queryFactory = queryGenerator.GetFactory <Profile>();
 }