narsil/Tanshu.Accounts.Repository/BusinessLayer/WaiterBI.cs

33 lines
893 B
C#
Raw Normal View History

using System.Collections.Generic;
using NHibernate;
using Tanshu.Accounts.Entities;
using NHibernate.Criterion;
namespace Tanshu.Accounts.Repository
{
public class WaiterBI : FluentGenericBase<Waiter>
{
public WaiterBI()
: base()
{ }
public WaiterBI(bool beginTransaction)
: base(beginTransaction)
{ }
public WaiterBI(ISession session)
: base(session)
{ }
public WaiterBI(ISession session, bool beginTransaction)
: base(session, beginTransaction)
{ }
public static IList<Waiter> List(Dictionary<string, string> filter)
{
using (var bi = new WaiterBI(false))
return bi.Query()
.WhereRestrictionOn(x => x.Name).IsLike(string.Format("%{0}%", filter["Name"]))
.List();
}
}
}