예제 #1
0
 public bool DeleteByPhysic(TKey key, string sqlId = "DeleteByPhysic")
 {
     return(sqlMapper.Execute(new RequestContext
     {
         Scope = Scope,
         SqlId = sqlId,
         Request = new { Id = key }
     }) > 0);
 }
예제 #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);
 }
예제 #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
         }
     });
 }
예제 #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
            }));
        }
예제 #5
0
 public int Execute(RequestContext context)
 {
     return(MapperInstance.Execute(context));
 }
예제 #6
0
 public int Execute(RequestContext context)
 {
     return(SqlMapper.Execute(context));
 }