Moved to fluent. Added support for Modifiers. Fixtures to load intial test data

This commit is contained in:
unknown
2011-01-30 12:44:05 +05:30
parent c841dc25f4
commit eb48c3754a
272 changed files with 10470 additions and 47160 deletions

View File

@ -1,10 +1,45 @@
using System;
using System.Runtime.Serialization;
using FluentNHibernate.Mapping;
namespace Tanshu.Accounts.Contracts
namespace Tanshu.Accounts.Entities
{
public class ModifierBO
public class Modifier
{
public string ModifierID { get; set; }
public virtual int ModifierID { get; set; }
public virtual string Name { get; set; }
public override int GetHashCode()
{
return ModifierID.GetHashCode() ^ Name.GetHashCode();
}
public override bool Equals(object obj)
{
if (obj is Modifier)
return (this == (Modifier)obj);
else
return false;
}
public override string ToString()
{
return string.Format("{0} - {1}", ModifierID, Name);
}
public static bool operator ==(Modifier a, Modifier b)
{
if (object.ReferenceEquals(null, a))
return object.ReferenceEquals(null, b);
if (!(a is Modifier))
return false;
if (!(b is Modifier))
return false;
return a.ModifierID == b.ModifierID && a.Name == b.Name;
}
public static bool operator !=(Modifier a, Modifier b)
{
return !(a == b);
}
}
}