Exemplo n.º 1
0
 public bool DeleteByPhysic(TKey key, string sqlId = "DeleteByPhysic")
 {
     return(sqlMapper.Execute(new RequestContext
     {
         Scope = Scope,
         SqlId = sqlId,
         Request = new { Id = key }
     }) > 0);
 }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 public virtual void Execute(Type entityClass, ISmartSqlMapper sqlMapper)
 {
     sqlMapper.Execute(new RequestContext
     {
         Scope   = entityClass.FullName,
         SqlId   = statement,
         Request = parameter
     });//.delete(statement, parameter);
 }
Exemplo n.º 3
0
 public void Insert()
 {
     _sqlMapper.Execute(new RequestContext
     {
         Scope   = Scope,
         SqlId   = "Insert",
         Request = new T_Entity
         {
             CreationTime   = DateTime.Now,
             FBool          = true,
             FDecimal       = 1,
             FLong          = 1,
             FNullBool      = false,
             FString        = Guid.NewGuid().ToString("N"),
             FNullDecimal   = 1.1M,
             LastUpdateTime = DateTime.Now,
             Status         = EntityStatus.Ok
         }
     });
 }
Exemplo n.º 4
0
        public static int Execute(this ISmartSqlMapper sqlMapper, string fullSqlId, dynamic @params)
        {
            EnsurePoint(ref fullSqlId);

            return(sqlMapper.Execute(new RequestContext()
            {
                Scope = fullSqlId.Split('.')[0],
                SqlId = fullSqlId.Split('.')[1],
                Request = @params
            }));
        }
Exemplo n.º 5
0
 public int Execute(RequestContext context)
 {
     return(MapperInstance.Execute(context));
 }
Exemplo n.º 6
0
 public int Execute(RequestContext context)
 {
     return(SqlMapper.Execute(context));
 }