GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Surbowl/ASP.NET-Core-RESTful-Note: 📒 杨旭《使用 ASP.NET Core 3.x 构建 RESTful Web API》系列课程的学习笔记

BranchesTags
Open more actions menu

Latest commit

 

History

100 Commits
100 Commits

Folders and files

NameName
Last commit message
Last commit date
Routine
Routine
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
cover.jpg
cover.jpg
 
 

Repository files navigation

ASP.NET-Core-RESTful-Note

image

本仓库是杨旭(solenovex)《使用 ASP.NET Core 3.x 构建 RESTful Web API》课程的学习笔记。

包含课程的项目代码,并注释随堂笔记与资料。

与原项目略有不同,本项目使用 SQL Server 数据库。

版本

master 分支是最新的,涵盖所有课程内容。

在寻找更早的版本?欢迎查看本仓库的 Releases,在课程的每个阶段都有 Release;
例如:截至视频 P8 的代码、 截至视频 P19 的代码 等。

杨老师已在 GitHub 发布课程原版代码,点此访问。

小地图

  • 课程视频
  • 课程博文
  • 课程 PPT
  • ASP.NET Core 3.x 入门课程
  • How to unapply a migration
  • 码云仓库(强制同步)

PATH

Routine.APi

│  appsettings.Development.json
│  appsettings.json
│  Program.cs
│  Routine.APi.csproj
│  Startup.cs
│
├─Controllers
│      RootController.cs                   // api                                  根目录
│      CompaniesController.cs              // api/companies                        公司(单个/集合)
│      CompanyCollectionsController.cs     // api/companycollections               指定公司集合
│      EmployeesController.cs              // api/companies/{companyId}/employees  员工(单个/集合)
│      
├─Data
│      RoutineDbContext.cs
│      
├─DtoParameters                            // Uri query parameters
│      CompanyDtoParameters.cs             //  -GET api/companies   
│      EmployeeDtoParameters.cs            //  -GET api/companies/{companyId}/employees
│      
├─Entities
│      Company.cs
│      Employee.cs
│      Gender.cs
│      
├─Helpers
│      ArrayModelBinder.cs                 // 自定义 ModelBinder,将 ids 字符串转为 IEnumerable<Guid>
│      IEnumerableExtensions.cs            // IEnumerable<T> 拓展,对集合资源进行数据塑形
│      IQueryableExtensions.cs             // IQueryable<T> 拓展,对集合资源进行排序
│      ObjectExtensions.cs                 // Object 拓展,对单个资源进行数据塑形
│      PagedList.cs                        // 继承 List<T>,对集合资源进行翻页处理
│      ResourceUriType.cs                  // 枚举,指明 Uri 前往上一页、下一页或本页
│      
├─Migrations
│      ...
│      
├─Models
│      CompanyFriendlyDto.cs               // 公司简略信息 Dto
│      CompanyFullDto.cs                   // 公司完整信息 Dto
│      CompanyAddDto.cs                    // 添加公司时使用的 Dto
│      CompanyAddWithBankruptTimeDto.cs    // 添加已破产的公司时使用的 Dto
│      EmployeeDto.cs                      // 员工信息 Dto
│      EmployeeAddOrUpdateDto.cs           // 添加或更新员工信息时使用的 Dto 的父类
│      EmployeeAddDto.cs                   // 添加员工时使用的 Dto,继承 EmployeeAddOrUpdateDto
│      EmployeeUpdateDto.cs                // 更新员工信息时使用的 Dto,继承 EmployeeAddOrUpdateDto
│      LinkDto.cs                          // HATEOAS 的 links 使用的 Dto
│     
├─Profiles                                 // AutoMapper 映射关系
│      CompanyProfile.cs
│      EmployeeProfile.cs
│      
├─Properties
│      launchSettings.json
│      
├─Services
│      ICompanyRepository.cs
│      IPropertyCheckerService.cs
│      IPropertyMapping.cs
│      IPropertyMappingService.cs
│      CompanyRepository.cs
│      PropertyCheckerService.cs           // 判断 Uri query parameters 中的 fields 是否合法
│      PropertyMappingValue.cs             // 属性映射关系,用于集合资源的排序
│      PropertyMapping.cs                  // 属性映射关系字典,声明源类型与目标类型,用于集合资源的排序
│      PropertyMappingService.cs           // 属性映射关系服务,用于集合资源的排序
│      
└─ValidationAttributes                     // 自定义 Model 验证 Attribute
        EmployeeNoMustDifferentFromFirstNameAttribute.cs  
        



欢迎大家对内容进行补充,只要是合理内容都可以 pull。

非常感谢杨老师 🤗

About

📒 杨旭《使用 ASP.NET Core 3.x 构建 RESTful Web API》系列课程的学习笔记

www.bilibili.com/video/av77957694

Topics

asp-net-coreentity-framework-corehateoasrestful-apisqlserver

Resources

Readme
Activity

Stars

67 stars

Watchers

5 watching

Forks

24 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.