public List <BusinessEntity> SearchBusiness(BusinessSearchEntity searchObject) { IBaseDataSvc channel = CreateChannel(); var result = channel.SearchBusiness(searchObject); channel.Dispose(); return(result); }
public List <BusinessEntity> SearchBusiness(BusinessSearchEntity searchObject) { //execute using (var db = VinaGerman.Database.VinagermanDatabase.GetDatabaseInstance()) { try { db.OpenConnection(); return(db.Resolve <IBusinessDB>().SearchBusiness(searchObject)); } finally { db.CloseConnection(); } } }
public List <BusinessEntity> SearchBusiness(BusinessSearchEntity searchObject) { List <BusinessEntity> result = null; string sqlStatement = "SELECT " + Environment.NewLine + "Business.BusinessId," + Environment.NewLine + "Business.Description," + Environment.NewLine + "Business.Deleted" + Environment.NewLine + "FROM Business " + Environment.NewLine + "WHERE Deleted=0 " + Environment.NewLine; if (searchObject.SearchText != null && searchObject.SearchText.Length > 0) { sqlStatement += "AND (Description LIKE N'%" + searchObject.SearchText + "%')" + Environment.NewLine; } //execute result = Connection.Query <BusinessEntity>(sqlStatement, null, Transaction).ToList(); return(result); }
public List <BusinessEntity> SearchBusiness(BusinessSearchEntity searchObject) { return(Factory.Resolve <IBusinessBL>().SearchBusiness(searchObject)); }