public List <Work> SelectWorksByImplementerId(int id) { WorkParser workParser = new WorkParser(); DataTable dataTable = new DataTable(); string sqlExpression = string.Format("Select * from Works where ImplementerId={0}", id); dataTable = connection.Select(sqlExpression); List <Work> works = workParser.Parse(dataTable); return(works); }
public List <Work> Select() { WorkParser workParser = new WorkParser(); DataTable dataTable = new DataTable(); string sqlExpression = "Select * from Works"; dataTable = connection.Select(sqlExpression); List <Work> works = workParser.Parse(dataTable); return(works); }
public Work SelectById(int id) { WorkParser workParser = new WorkParser(); DataTable dataTable = new DataTable(); string sqlExpression = string.Format("Select * from Works where Id={0}", id); dataTable = connection.Select(sqlExpression); List <Work> works = workParser.Parse(dataTable); Work work = works.FirstOrDefault(); return(work); }