예제 #1
0
        public GetDcTypeQM GetDcType()
        {
            var model = new GetDcTypeQM();

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

                var command = new GetDcTypeSelectCommand {
                    Connection = connection
                };
                model = command.Execute();
            }

            return(model);
        }
        public GetDcTypeQM Execute()
        {
            var response = new GetDcTypeQM();

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

                using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand))
                {
                    response.dcTypeModelList = reader.ToList <DcTypeModel>();
                }
            }
            return(response);
        }