学海无涯

导航

上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 44 下一页

2023年3月29日 #

DDD领域驱动设计

摘要: 跨多个实体的操作,在DDD中,用领域服务来抽象。领域体现的是业务能力,实体体现的是个体的能力。个体能力的组合才能够成业务。 聚合根:对聚合根中实体的访问,只能通过聚合根进行访问,不要直接访问。 业务:在DDD当中业务指,引起实体状态发生变化的操作,称为业务。 阅读全文

posted @ 2023-03-29 18:35 宁静致远. 阅读(36) 评论(0) 推荐(0)

2023年3月26日 #

Task 类 多线程

摘要: Task 类 定义 命名空间: System.Threading.Tasks程序集: System.Runtime.dll表示一个异步操作 public class Task : IAsyncResult, IDisposable 继承 Object->Task派生 System.Threading 阅读全文

posted @ 2023-03-26 21:36 宁静致远. 阅读(71) 评论(0) 推荐(0)

2023年3月24日 #

在清洁架构中用 Dapper 实现仓储模式

摘要: https://ianrufus.com/blog/2017/04/c-unit-of-work-pattern-with-dapper/ https://github.com/ianrufus/BlogPosts/tree/master/DapperUnitOfWork https://blog. 阅读全文

posted @ 2023-03-24 20:03 宁静致远. 阅读(56) 评论(0) 推荐(0)

2023年3月23日 #

Fetch 项目级封装

摘要: http.ts 阅读全文

posted @ 2023-03-23 10:44 宁静致远. 阅读(28) 评论(0) 推荐(0)

Fetch 基本操作 Get Post Delete Put

摘要: //删除请求 async function DeleteModel(model: Customer) { let url = `http://localhost:57679/api/Customers/${model.id}` await fetch(url, { method: 'delete' 阅读全文

posted @ 2023-03-23 10:43 宁静致远. 阅读(162) 评论(0) 推荐(0)

2023年3月22日 #

Vue 工具

摘要: http://www.axios-js.com/ API测试资源 https://jsonplaceholder.typicode.com/ Fetch API Element UI 控件使用指南 https://cloud.tencent.com/developer/section/1489873 阅读全文

posted @ 2023-03-22 10:35 宁静致远. 阅读(24) 评论(0) 推荐(0)

2023年3月21日 #

Router 路由

摘要: 路由组件显示占位符 <router-view></router-view> 使用路径path 或 name 在标签中导航 <RouterLink to="ClassTest">Class</RouterLink>| <RouterLink :to="{name:'TypeTest'}">TypeTe 阅读全文

posted @ 2023-03-21 17:52 宁静致远. 阅读(24) 评论(0) 推荐(0)

2023年3月20日 #

部署

摘要: 构建应用 设置打包时的相对路径 vite.config.ts // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], resolve: { alias: { '@': fileURLToPath(ne 阅读全文

posted @ 2023-03-20 14:17 宁静致远. 阅读(281) 评论(0) 推荐(0)

状态管理介绍 pinia

摘要: 什么是状态管理? 理论上来说,每一个 Vue 组件实例都已经在“管理”它自己的响应式状态了。 <script setup> import { ref } from 'vue' // 状态 const count = ref(0) // 动作 function increment() { count. 阅读全文

posted @ 2023-03-20 11:54 宁静致远. 阅读(119) 评论(0) 推荐(0)

pinia 使用状态管理

摘要: 一、定义状态变量、方法 在 src\stores\ 目录下,新建状态管理文件 counter.ts 为了确保改变状态的逻辑像状态本身一样集中,建议在 store 上定义方法,方法的名称应该要能表达出行动的意图: import { ref, computed } from 'vue' import { 阅读全文

posted @ 2023-03-20 11:35 宁静致远. 阅读(70) 评论(0) 推荐(0)

上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 44 下一页