using
System;
using
Iesi.Collections.Generic;
namespace
NH12.MyExample.Domain
{
#region
Company
public
class
Company
{
private
string
_companyID;
private
string
_companyName;
public
Company(
string
id,
string
name)
{
_companyID
=
id;
_companyName
=
name;
}
public
Company()
{
}
public
virtual
string
CompanyID
{
get
{
return
_companyID; }
set
{ _companyID
=
value; }
}
public
virtual
string
CompanyName
{
get
{
return
_companyName; }
set
{ _companyName
=
value; }
}
#region
override
public
override
bool
Equals(
object
obj)
{
if
(
this
==
obj)
return
true
;
if
(obj
==
null
||
obj.GetType()
!=
this
.GetType())
return
false
;
Company company
=
obj
as
Company;
return
company
!=
null
&&
company.CompanyID
==
_companyID;
}
public
override
int
GetHashCode()
{
return
_companyID.GetHashCode();
}
public
override
string
ToString()
{
return
_companyID;
}
#endregion
}
#endregion
}