59909a5ee7
Must use the Repositories with Using or else bad things will happen.
31 lines
885 B
C#
31 lines
885 B
C#
using System.Collections.Generic;
|
|
using NHibernate;
|
|
using Tanshu.Accounts.Entities;
|
|
|
|
|
|
namespace Tanshu.Accounts.Repository
|
|
{
|
|
public class CustomerBI : FluentGenericBase<Customer>
|
|
{
|
|
public CustomerBI()
|
|
: base()
|
|
{ }
|
|
public CustomerBI(bool beginTransaction)
|
|
: base(beginTransaction)
|
|
{ }
|
|
public CustomerBI(ISession session)
|
|
: base(session)
|
|
{ }
|
|
public CustomerBI(ISession session, bool beginTransaction)
|
|
: base(session, beginTransaction)
|
|
{ }
|
|
public static IList<Customer> List(Dictionary<string, string> filter)
|
|
{
|
|
using (var bi = new CustomerBI(false))
|
|
return bi.Query()
|
|
.WhereRestrictionOn(x => x.Name).IsLike(string.Format("%{0}%", filter["Universal"]))
|
|
.List();
|
|
}
|
|
}
|
|
}
|