public List <TypeVm> GetAllServiceTypes() { var db = ServiceTypeDb.GetAllServiceTypes(); var types = new List <TypeVm>(); foreach (DataRow row in db.Rows) { var type = new TypeVm(); type.Id = (int)row["Id"]; type.Name = (string)row["Name"]; types.Add(type); } return(types); }
private IEnumerable <ServiceType> GetAllServiceTypes() { var db = ServiceTypeDb.GetAllServiceTypes(); var types = new List <ServiceType>(); foreach (DataRow row in db.Rows) { var type = new ServiceType(); type.Id = (int)row["Id"]; type.Name = (string)row["Name"]; types.Add(type); } return(types); }