public IEnumerable <Model.Process> GetAllProcesses() { return(pta.GetData().Select(p => new Model.Process { ID = p.ID, Name = p.Name })); }
public void TestCreateProcess() { DAL.ORLMDataSetTableAdapters.ProcessTableAdapter pta = new DAL.ORLMDataSetTableAdapters.ProcessTableAdapter(); pta.Insert("Finance"); DAL.ORLMDataSet.ProcessDataTable processes = new DAL.ORLMDataSet.ProcessDataTable(); processes = pta.GetData(); Assert.AreEqual(processes[0].Name, "Finance"); }