public IQueryable <T> Query <T>(SqlParseResult result) where T : class, IEntity <T>, new() { return(Query(result) .ToList() .ConvertAll(x => x as T) .AsQueryable()); }
public IQueryable <IEntity> Query(SqlParseResult result) { if (result.Paging) { return(QueryBySql( result.Sql.Schema.GetType(), result.Command, result.Sql.PageSize, result.Sql.PageIndex, result.AllParameters.ToArray() )); } else { return(QueryBySql( result.Sql.Schema.GetType(), result.Command, result.AllParameters.ToArray() )); } }
public DataResult Execute(SqlParseResult result) { if (!result.Success) { var r = new DataResult() { Message = result.Message, Exception = result.Exception, Success = result.Success, TransactionID = base.TransactionID, ExecuteMethod = "EntityApi.Execute", CommandType = CommandType.Text, AffectedCount = 0, ScalarValue = null, Command = result.Command, }; r.Datas.AddRange(result.Datas); r.Parameters.AddRange(result.AllParameters); } return(ExecuteSql( result.Command, result.AllParameters.ToArray() )); }