25 lines
678 B
C#
25 lines
678 B
C#
using System.Collections.Generic;
|
|
using NHibernate;
|
|
using Tanshu.Accounts.Entities;
|
|
|
|
|
|
namespace Tanshu.Accounts.Repository
|
|
{
|
|
public class CustomerBI : UnitOfWork<Customer>
|
|
{
|
|
public IList<Customer> List(Dictionary<string, string> filter)
|
|
{
|
|
return _session.QueryOver<Customer>()
|
|
.WhereRestrictionOn(x => x.Name).IsLike(string.Format("%{0}%", filter["Universal"]))
|
|
.List();
|
|
}
|
|
public static IList<Customer> StaticList(Dictionary<string, string> filter)
|
|
{
|
|
using (var bi = new CustomerBI())
|
|
{
|
|
return bi.List(filter);
|
|
}
|
|
}
|
|
}
|
|
}
|