コード例 #1
0
        // Token: 0x06000783 RID: 1923 RVA: 0x00033BCC File Offset: 0x00031DCC
        public static IList <Dependency> GetAllDependencies()
        {
            IList <Dependency> list = new List <Dependency>();

            using (SqlCommand textCommand = SqlHelper.GetTextCommand("SELECT * FROM [dbo].[Dependencies]"))
            {
                using (IDataReader dataReader = SqlHelper.ExecuteReader(textCommand))
                {
                    while (dataReader.Read())
                    {
                        list.Add(DependencyDAL.CreateDependency(dataReader));
                    }
                }
            }
            return(list);
        }
コード例 #2
0
        public static IList <Dependency> GetAllDependencies()
        {
            IList <Dependency> dependencyList = (IList <Dependency>) new List <Dependency>();

            using (SqlCommand textCommand = SqlHelper.GetTextCommand("SELECT * FROM [dbo].[Dependencies]"))
            {
                using (IDataReader reader = SqlHelper.ExecuteReader(textCommand))
                {
                    while (reader.Read())
                    {
                        ((ICollection <Dependency>)dependencyList).Add(DependencyDAL.CreateDependency(reader));
                    }
                }
            }
            return(dependencyList);
        }
コード例 #3
0
        // Token: 0x06000784 RID: 1924 RVA: 0x00033C3C File Offset: 0x00031E3C
        public static Dependency GetDependency(int id)
        {
            Dependency result = null;

            using (SqlCommand textCommand = SqlHelper.GetTextCommand("SELECT * FROM [dbo].[Dependencies] WHERE DependencyId = @id"))
            {
                textCommand.Parameters.AddWithValue("@id", id);
                using (IDataReader dataReader = SqlHelper.ExecuteReader(textCommand))
                {
                    if (dataReader.Read())
                    {
                        result = DependencyDAL.CreateDependency(dataReader);
                    }
                }
            }
            return(result);
        }