/// <summary>
 /// Use Direct SQL aspect implementation based on EntityFramework Core
 /// </summary>
 /// <param name="conf">Channel configuration</param>
 /// <param name="context">Lazy disposable wrapper around DbContext</param>
 public static void UseEfCoreDirectSql(this ChannelBinding <CommandQueryChannel <Tecture.Aspects.DirectSql.DirectSql.Command, Tecture.Aspects.DirectSql.DirectSql.Query> > conf,
                                       ILazyDisposable <DbContext> context, InterpolatorFactory fac = null)
 {
     if (fac == null)
     {
         fac = new InterpolatorFactory();
     }
     conf.UseEfCoreDirectSqlCommand(context, fac);
     conf.UseEfCoreDirectSqlQuery(context, fac);
 }
示例#2
0
 public EfCore_Orm_CommandFeature(ILazyDisposable <DbContext> context)
 {
     _context = context;
 }
示例#3
0
 /// <summary>
 /// Use Direct SQL query feature implementation based on EntityFramework Core
 /// </summary>
 /// <param name="conf">Channel configuration</param>
 /// <param name="context">Lazy disposable wrapper around DbContext</param>
 public static void UseEfCoreDirectSqlQuery(this ChannelConfiguration <QueryChannel <Tecture.Features.SqlStroke.Query> > conf, ILazyDisposable <DbContext> context, InterpolatorFactory fac = null)
 {
     if (fac == null)
     {
         fac = new InterpolatorFactory();
     }
     conf.ForQuery(new EFCore_DirectSql_QueryFeature(context, conf.Channel, fac));
 }
示例#4
0
 /// <summary>
 /// Use Direct SQL query aspect implementation based on EntityFramework Core
 /// </summary>
 /// <param name="conf">Channel configuration</param>
 /// <param name="context">Lazy disposable wrapper around DbContext</param>
 public static void UseEfCoreOrmQuery(this ChannelBinding <QueryChannel <Tecture.Aspects.Orm.Query> > conf, ILazyDisposable <DbContext> context)
 {
     conf.ForQuery(new EfCore_Orm_QueryAspect(context));
 }
示例#5
0
 public AddCommandRunner(Auxilary aux, ILazyDisposable <DbContext> dc)
 {
     _aux = aux;
     _dc  = dc;
 }
示例#6
0
 public EFCore_DirectSql_CommandAspect(ILazyDisposable <DbContext> context, Type channel, InterpolatorFactory fac)
     : base(new EfCoreStokeRuntime(context, channel, fac))
 {
     Context = context;
 }
示例#7
0
 public EFCore_DirectSql_QueryFeature(ILazyDisposable <DbContext> context, Type channel, InterpolatorFactory fac) : base(new EfCoreStokeRuntime(context, channel, fac))
 {
     _dbContext = context;
 }
 public EfCoreStokeRuntime(ILazyDisposable <DbContext> dbContext, Type channel, InterpolatorFactory fac)
 {
     Mapper  = new EfCoreMapper(dbContext);
     Channel = channel;
     _fac    = fac;
 }
示例#9
0
 /// <summary>
 /// Use Direct SQL query feature implementation based on EntityFramework Core
 /// </summary>
 /// <param name="conf">Channel configuration</param>
 /// <param name="context">Lazy disposable wrapper around DbContext</param>
 public static void UseEfCoreOrmQuery(this ChannelConfiguration <QueryChannel <Tecture.Features.Orm.Query> > conf, ILazyDisposable <DbContext> context)
 {
     conf.ForQuery(new EfCore_Orm_QueryFeature(context));
 }
示例#10
0
        /// <summary>
        /// Use Direct SQL commands feature implementation based on EntityFramework Core
        /// </summary>
        /// <param name="conf">Channel configuration</param>
        /// <param name="context">Lazy disposable wrapper around DbContext</param>
        public static void UseEfCoreOrmCommand(this ChannelConfiguration <CommandChannel <Tecture.Features.Orm.Command> > conf, ILazyDisposable <DbContext> context)
        {
            var fe = new EfCore_Orm_CommandFeature(context);

            conf.ForCommand(fe, new EfCore_Orm_Saver(context));
        }
 public DeletePkCommandRunner(Auxiliary aux, ILazyDisposable <DbContext> dc)
 {
     _dc  = dc;
     _aux = aux;
 }
 public EfCore_Orm_QueryFeature(ILazyDisposable <DbContext> context)
 {
     _context = context;
 }
 public UpdateCommandRunner(Auxiliary aux, ILazyDisposable <DbContext> dc)
 {
     _aux = aux;
     _dc  = dc;
 }
示例#14
0
 /// <summary>
 /// Use Direct SQL feature implementation based on EntityFramework Core
 /// </summary>
 /// <param name="conf">Channel configuration</param>
 /// <param name="context">Lazy disposable wrapper around DbContext</param>
 public static void UseEfCoreDirectSql(this ChannelConfiguration <CommandQueryChannel <Tecture.Features.SqlStroke.Command, Tecture.Features.SqlStroke.Query> > conf, ILazyDisposable <DbContext> context, InterpolatorFactory fac = null)
 {
     if (fac == null)
     {
         fac = new InterpolatorFactory();
     }
     conf.UseEfCoreDirectSqlCommand(context, fac);
     conf.UseEfCoreDirectSqlQuery(context, fac);
 }
示例#15
0
 public EfCoreMapper(ILazyDisposable <DbContext> context)
 {
     _context = context;
 }
示例#16
0
 public UpdatePkCommandRunner(TestingContext aux, ILazyDisposable <DbContext> dc)
 {
     _aux = aux;
     _dc  = dc;
 }
示例#17
0
 /// <summary>
 /// Use Direct SQL feature implementation based on EntityFramework Core
 /// </summary>
 /// <param name="conf">Channel configuration</param>
 /// <param name="context">Lazy disposable wrapper around DbContext</param>
 public static void UseEfCoreOrm(this ChannelConfiguration <CommandQueryChannel <Tecture.Features.Orm.Command, Tecture.Features.Orm.Query> > conf, ILazyDisposable <DbContext> context)
 {
     conf.UseEfCoreOrmCommand(context);
     conf.UseEfCoreOrmQuery(context);
 }
 public EfCore_Orm_CommandAspect(ILazyDisposable <DbContext> context)
 {
     _context = context;
 }
示例#19
0
 public RelateCommandRunner(Auxilary aux, ILazyDisposable <DbContext> dc)
 {
     _dc  = dc;
     _aux = aux;
 }
 public DerelateCommandRunner(TestingContext aux, ILazyDisposable <DbContext> dc)
 {
     _dc  = dc;
     _aux = aux;
 }
示例#21
0
        /// <summary>
        /// Use Direct SQL commands aspect implementation based on EntityFramework Core
        /// </summary>
        /// <param name="conf">Channel configuration</param>
        /// <param name="context">Lazy disposable wrapper around DbContext</param>
        public static void UseEfCoreDirectSqlCommand(this ChannelBinding <CommandChannel <Tecture.Aspects.DirectSql.DirectSql.Command> > conf, ILazyDisposable <DbContext> context, InterpolatorFactory fac = null)
        {
            if (fac == null)
            {
                fac = new InterpolatorFactory();
            }
            var fe = new EFCore_DirectSql_CommandAspect(context, conf.Channel, fac);

            conf.ForCommand(fe);
        }
 public EfCore_Orm_Saver(ILazyDisposable <DbContext> dc)
 {
     _dc = dc;
 }
示例#23
0
 /// <summary>
 /// Use Direct SQL query aspect implementation based on EntityFramework Core
 /// </summary>
 /// <param name="conf">Channel configuration</param>
 /// <param name="context">Lazy disposable wrapper around DbContext</param>
 public static void UseEfCoreDirectSqlQuery(this ChannelBinding <QueryChannel <Tecture.Aspects.DirectSql.DirectSql.Query> > conf, ILazyDisposable <DbContext> context, InterpolatorFactory fac = null)
 {
     if (fac == null)
     {
         fac = new InterpolatorFactory();
     }
     conf.ForQuery(new EFCore_DirectSql_QueryAspect(context, conf.Channel, fac));
 }
示例#24
0
        /// <summary>
        /// Use Direct SQL commands aspect implementation based on EntityFramework Core
        /// </summary>
        /// <param name="conf">Channel configuration</param>
        /// <param name="context">Lazy disposable wrapper around DbContext</param>
        public static void UseEfCoreOrmCommand(this ChannelBinding <CommandChannel <Tecture.Aspects.Orm.Command> > conf, ILazyDisposable <DbContext> context)
        {
            var fe = new EfCore_Orm_CommandAspect(context);

            conf.ForCommand(fe, new EfCore_Orm_Saver(context));
        }
 public EfCore_Orm_QueryAspect(ILazyDisposable <DbContext> context)
 {
     _context = context;
 }
示例#26
0
 /// <summary>
 /// Use Direct SQL aspect implementation based on EntityFramework Core
 /// </summary>
 /// <param name="conf">Channel configuration</param>
 /// <param name="context">Lazy disposable wrapper around DbContext</param>
 public static void UseEfCoreOrm(this ChannelBinding <CommandQueryChannel <Tecture.Aspects.Orm.Command, Tecture.Aspects.Orm.Query> > conf, ILazyDisposable <DbContext> context)
 {
     conf.UseEfCoreOrmCommand(context);
     conf.UseEfCoreOrmQuery(context);
 }
示例#27
0
        /// <summary>
        /// Use Direct SQL commands feature implementation based on EntityFramework Core
        /// </summary>
        /// <param name="conf">Channel configuration</param>
        /// <param name="context">Lazy disposable wrapper around DbContext</param>
        public static void UseEfCoreDirectSqlCommand(this ChannelConfiguration <CommandChannel <Tecture.Features.SqlStroke.Command> > conf, ILazyDisposable <DbContext> context, InterpolatorFactory fac = null)
        {
            if (fac == null)
            {
                fac = new InterpolatorFactory();
            }
            var fe = new EFCore_DirectSql_CommandFeature(context, conf.Channel, fac);

            conf.ForCommand(fe, new EFCore_DirectSql_Saver(fe));
        }