添加excel模块
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Entities;
|
||||
|
||||
namespace Yi.Framework.Domain.Student.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// 学生实体
|
||||
/// </summary>
|
||||
[SugarTable("Student")]
|
||||
public class StudentEntity : IEntity<long>
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 学生名称
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 学号
|
||||
/// </summary>
|
||||
public long Number { get;set ; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Ddd.Repositories;
|
||||
using Yi.Framework.Domain.Student.Entities;
|
||||
|
||||
namespace Yi.Framework.Domain.Student.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 仓储抽象
|
||||
/// </summary>
|
||||
public interface IStudentRepository:IRepository<StudentEntity>
|
||||
{
|
||||
Task<List<StudentEntity>> GetMyListAsync();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Domain.Student.IRepository;
|
||||
|
||||
namespace Yi.Framework.Domain.Student
|
||||
{
|
||||
/// <summary>
|
||||
/// 领域服务
|
||||
/// </summary>
|
||||
public class StudentManager
|
||||
{
|
||||
private readonly IStudentRepository _studentRepository;
|
||||
public StudentManager(IStudentRepository studentRepository)
|
||||
{
|
||||
_studentRepository=studentRepository;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user