예제 #1
0
        public GetDcMasterQM GetDcMaster()
        {
            GetDcMasterQM getDcMasterQM = new GetDcMasterQM();

            using (var connection = new DbConnectionProvider().CreateConnection())
            {
                connection.Open();

                var command = new GetDcMasterSelectCommand {
                    Connection = connection
                };
                getDcMasterQM = command.Execute();
            }

            return(getDcMasterQM);
        }
        public GetDcMasterQM Execute()
        {
            var response = new GetDcMasterQM();

            using (var sqlCommand = CreateCommand())
            {
                sqlCommand.Connection  = Connection;
                sqlCommand.CommandText = "[dbo].[uspGetDcMaster]";
                sqlCommand.CommandType = CommandType.StoredProcedure;

                using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand))
                {
                    response.GetDcMasterModelList = reader.ToList <GetDcMasterModel>();
                }
            }

            return(response);
        }