Beispiel #1
0
 public bool Execute(IList <SqlCommand> unitOfWorks)
 {
     using (IOrm connection = this.orm)
     {
         return(connection.Execute(unitOfWorks));
     }
 }
Beispiel #2
0
 public bool Execute <T>(string sql, IList <Parameter> parameters = null, int timeout = 15) where T : class, new()
 {
     using (IOrm orm = this.orm)
     {
         return(orm.Execute(new SqlCommand(sql, parameters, timeout)));
     }
 }
Beispiel #3
0
 public bool Insert <T>(T entity, int timeout) where T : class, new()
 {
     if (entity != null)
     {
         SqlCommand queryResult = DynamicQuery.GetInsertQuery(typeof(T).Name.ToLowerInvariant().Pluralize(), entity);
         using (IOrm orm = this.orm)
         {
             return(orm.Execute(new SqlCommand(queryResult.Statement, queryResult.Parameters, timeout)));
         }
     }
     return(false);
 }