添加dto模式的demo测试
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using AutoMapper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Model.RABC.Entitys;
|
||||
|
||||
namespace Yi.Framework.DTOModel.RABC.Student.MapperConfig
|
||||
{
|
||||
public class StudentProfile : Profile
|
||||
{
|
||||
public StudentProfile()
|
||||
{
|
||||
CreateMap<StudentCreateInput, StudentEntity>();
|
||||
CreateMap<StudentUpdateInput, StudentEntity>();
|
||||
CreateMap<StudentCreateUpdateInput, StudentEntity>();
|
||||
CreateMap<StudentEntity, StudentGetOutput>();
|
||||
CreateMap<StudentEntity, StudentListOutput>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yi.Framework.DTOModel.RABC.Student
|
||||
{
|
||||
public class StudentCreateInput
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Remark { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yi.Framework.DTOModel.RABC.Student
|
||||
{
|
||||
public class StudentCreateUpdateInput
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Remark { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.DTOModel.RABC.Student
|
||||
{
|
||||
public class StudentGetOutput : EntityDto<Guid>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Remark { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yi.Framework.Model.Base;
|
||||
|
||||
namespace Yi.Framework.DTOModel.RABC.Student
|
||||
{
|
||||
public class StudentListOutput : EntityDto<Guid>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Remark { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yi.Framework.DTOModel.RABC.Student
|
||||
{
|
||||
public class StudentUpdateInput
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Remark { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user