private Task <int> ExecuteSQLWithParams(string sql, params SqlParameter[] parameters) { string query = DbHelpers.GetQuery(sql, parameters); return(this.Database.ExecuteSqlRawAsync(query, parameters)); //return this.Database.ExecuteSqlCommandAsync(query, parameters); }
private IQueryable <T> FromSQLRAWWithOutParams <T>(string sql) where T : class { string query = DbHelpers.GetQuery(sql); return(this.Query <T>().FromSqlRaw(query)); }
private IQueryable <T> FromSQLRAWWithParams <T>(string sql, params SqlParameter[] parameters) where T : class { string query = DbHelpers.GetQuery(sql, parameters); return(this.Query <T>().FromSqlRaw(query, parameters)); }