Acceleratio.SPDG.Generator.SampleData.importDepartments C# (CSharp) Method

importDepartments() private static method

private static importDepartments ( string csvFileName ) : ReadOnlyCollection
csvFileName string
return ReadOnlyCollection
        private static ReadOnlyCollection<DepartmentData> importDepartments(string csvFileName)
        {
            return new ReadOnlyCollection<DepartmentData>(File.ReadAllLines(@"SampleData\" + csvFileName)
               .Select(line => line.Split(','))
               .Select(tokens => new DepartmentData() { Department = tokens[0], Subdepartment = tokens[1] })
               .ToList());
        }