public Result <List <TT> > Contain(string columnName, string word) { string querry = $"SELECT * FROM {tableofTT.TableName} where {columnName} like '%{word}%' "; SqlDataAdapter adp = new SqlDataAdapter(querry, Tools.Connection); return(adp.Changer <TT>()); }
public Result <List <TT> > SelectById(int id) { string querry = $"select * from {tableofTT.TableName} where {tableofTT.IdentityColumn} = {id}"; SqlDataAdapter adp = new SqlDataAdapter(querry, Tools.Connection); return(adp.Changer <TT>()); }
public Result <List <TT> > SelectActive() { string querry = $"select * from {tableofTT.TableName} where {tableofTT.IsActiveColumn} = 1"; SqlDataAdapter adp = new SqlDataAdapter(querry, Tools.Connection); return(adp.Changer <TT>()); }
public Result <List <TT> > OrderByAsc(int count) { string querry = $"SELECT TOP({count}) * FROM {tableofTT.TableName} WHERE IsActive = 1 ORDER BY {tableofTT.IdentityColumn} ASC"; SqlDataAdapter adp = new SqlDataAdapter(querry, Tools.Connection); return(adp.Changer <TT>()); }
public Result <List <TT> > SelectForeignByIdCom(int?id) { string querry = $"SELECT * FROM {tableofTT.TableName} WHERE {tableofTT.ForeignColumn} = {id} "; SqlDataAdapter adp = new SqlDataAdapter(querry, Tools.Connection); return(adp.Changer <TT>()); }