Moved to fluent. Added support for Modifiers. Fixtures to load intial test data
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user