[DataContract(), XmlRoot()]
[KnownType(typeof(Group))]
[KnownType(typeof(Role))]
public class Department
{
private List<Group> _Groups;
private List<Role> _Role;
public string Name { get; set; }
[DataMember()]
public List<Group> Groups
{
get
{
if (_Groups == null)
{
_Groups = new List<Group>();
}
return _Groups;
}
set
{
_Groups = value;
}
}
[DataMember]
public List<Role> Role
{
get
{
if (_Role == null)
{
_Role = new List<Role>();
}
return _Role;
}
set
{
_Role = value;
}
}
}
[DataContract()]
public class Role
{
public Role(string Name)
{
Title = Name;
}
[DataMember()]
public string Title { get; set; }
}
[DataContract()]
public class Group
{
public Group (string GroupName)
{
Name = GroupName;
}
public Group (string GroupName, string GroupDisplayName)
{
Name = GroupName;
DisplayName = GroupDisplayName;
}
[DataMember()]
public string Name { get; set; }
[DataMember()]
public string DisplayName { get; set; }
}
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE