예제 #1
0
        public List <Customer> Load(ISqlConnectionInfo connection, Service service, string value, CustomerIdentifier identifier)
        {
            SqlQueryParameters parameters = new SqlQueryParameters();
            string             parameter  = string.Format("{0}", identifier.ToString());

            parameters.Where = string.Format("[c].{0} = @{0}", parameter);
            if (service != null)
            {
                parameters.Where += " AND [c_s].ServiceID = @ServiceID";
                parameters.Arguments.Add("ServiceID", service.ID);
            }
            parameters.OrderBy = "[c].Created DESC";
            parameters.Arguments.Add(parameter, value);
            return(this.LoadMany(connection, parameters));
        }