示例#1
0
文件: Model.cs 项目: PongNT/SandBox
        public department GetDepartment(string postalCode)
        {
            var dptCode     = GetDptCode(postalCode);
            var departement = (Departments.Contains(dptCode)) ? Departments[dptCode] : null;

            return(departement);
        }
示例#2
0
 private bool HasDepartment(Department dep)
 {
     if (dep == null)
     {
         throw new ArgumentNullException();
     }
     return(Departments.Contains(dep));
 }