Ejemplo n.º 1
0
        /// <summary>
        /// get states with IN operator
        /// </summary>
        /// <param name="names"></param>
        /// <returns></returns>
        public ICollection <State> getWithInOperator(IEnumerable <string> names)
        {
            var dataset = new Database1DataSet {
                EnforceConstraints = false
            };

            dataset.BeginInit();
            this.manager.StatesTableAdapter.FillByInOperator(dataset.States, names);
            dataset.EndInit();

            var result = prepareStates(dataset.States);

            dataset.Dispose();

            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// get all states
        /// </summary>
        /// <returns>all states</returns>
        public ICollection <State> getAll()
        {
            var dataset = new Database1DataSet {
                EnforceConstraints = false
            };

            dataset.BeginInit();
            this.manager.StatesTableAdapter.Fill(dataset.States);
            dataset.EndInit();

            var result = prepareStates(dataset.States);

            dataset.Dispose();

            return(result);
        }