> For the complete documentation index, see [llms.txt](https://docs.zongsoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zongsoft.com/framework/core/data.md).

# Zongsoft.Data

Zongsoft.Data 命名空间及其子命名空间在核心类库中的职责。

[`Zongsoft.Data`](https://github.com/Zongsoft/framework/tree/main/Zongsoft.Data) 在[核心类库](https://github.com/Zongsoft/framework/tree/main/Zongsoft.Core)中定义数据访问的基础抽象、数据服务模型、条件、操作元、模式、分页、排序、事务、数据字典和数据元数据。完整的数据引擎实现由 `Zongsoft.Data` 模块继续扩展。

## 主要职责

* 定义 `IDataAccess`、`IDataService`、`IDataSearcher` 等数据访问和数据服务抽象。
* 表达查询条件、操作元、分页、排序、返回值、数据模式和数据类型。
* 提供 [`Transaction`](/framework/core/data/transactions.md) 环境事务对象和事务参与登记模型。
* 提供数据服务事件、数据操作选项、模型描述和数据字典。
* 提供数据元数据抽象，供映射文件和数据引擎实现使用。

## 子命名空间

| 命名空间                                                                 | 说明                       |
| -------------------------------------------------------------------- | ------------------------ |
| `Zongsoft.Data.Archiving`                                            | 数据归档相关抽象。                |
| `Zongsoft.Data.Metadata`                                             | 实体、属性、关联、命令和参数等数据元数据模型。  |
| [`Zongsoft.Data.Transactions`](/framework/core/data/transactions.md) | 事务状态、事务信息、登记上下文和事务参与者抽象。 |

## 相关资源

* [Data 源码目录](https://github.com/Zongsoft/framework/tree/main/Zongsoft.Core/src/Data)
* [数据引擎](/framework/data.md)
* [Zongsoft.Data NuGet 包](https://www.nuget.org/packages/Zongsoft.Data)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zongsoft.com/framework/core/data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
