public static ConfigItem GetByCompanyProductAndName(string company, string product, string name) { if (company == null) { throw new ArgumentNullException("company"); } if (company.Length == 0) { throw new ArgumentOutOfRangeException("'company' is zero-length."); } if (product == null) { throw new ArgumentNullException("product"); } if (product.Length == 0) { throw new ArgumentOutOfRangeException("'product' is zero-length."); } if (name == null) { throw new ArgumentNullException("name"); } if (name.Length == 0) { throw new ArgumentOutOfRangeException("'name' is zero-length."); } // create... SqlFilter filter = CreateFilter(); filter.Constraints.Add("companyname", company); filter.Constraints.Add("productname", product); filter.Constraints.Add("name", name); // return... return((ConfigItem)filter.ExecuteEntity()); }
internal static Bookmark GetByOrdinal(int ordinal) { SqlFilter filter = new SqlFilter(typeof(Bookmark)); filter.AddConstraint("ordinal", ordinal); filter.AddConstraint("islocaldeleted", false); // return... return filter.ExecuteEntity<Bookmark>(); }