定义应用服务接口需要用到的DTO类
为了在进行查询时使用, PagedOrgResultRequestDto被用来将模块数据传递到基础设施层.
1. 在Visual Studio 2017的“解决方案资源管理器”中,右键单击“ABP.TPLMS.Application”项目,在弹出菜单中选择“添加” > “新建文件夹”,并重命名为“Orgs”
2. 使用鼠标右键单击我们刚才创建的“Orgs”文件夹,在弹出菜单中选择“添加” > “新建文件夹”,并重命名为“Dto”。
3.右键单击“Dto”文件夹,然后选择“添加” > “类”。 将类命名为 Paged OrgResultRequestDto,然后选择“添加”。代码如下。
复制代码
using Abp.Application.Services.Dto;
using Abp.Application.Services.Dto;
using System;
using System.Collections.Generic;
using System.Text;
namespace ABP.TPLMS.Orgs.Dto
复制代码
4.右键单击“Dto”文件夹,然后选择“添加” > “类”。 将类命名为 OrgDto,然后选择“添加”。代码如下。
复制代码
using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using ABP.TPLMS.Entitys;
using System;
using System.Collections.Generic;
using System.Text;
namespace ABP.TPLMS.Orgs.Dto
{
[AutoMapFrom(typeof(Org))]
public class OrgDto : EntityDto<int>
{
int m_parentId = 0;
public string Name { get; set; }
public string HotKey { get; set; }
public int ParentId { get { return m_parentId; } set { m_parentId = value; } }
public string P