摘要: 1、nuget引用 Microsoft.EntityFrameworkCore Microsoft.EntityFrameworkCore.SqlServer Microsoft.EntityFrameworkCore.SqlServer.Design Microsoft.EntityFramewo 阅读全文
posted @ 2022-07-24 23:26 ziff123 阅读(121) 评论(0) 推荐(0)
摘要: 1、查看头像保存的路径有没有存在Syn_SetPhotoPath 2、如果有处理头像,处理完记得关闭 阅读全文
posted @ 2022-07-07 09:29 ziff123 阅读(41) 评论(0) 推荐(0)
摘要: 1、查看头像照片设置的路径有没有存在Syn_SetPhotoPath 2、如果有处理头像,头像处理完有没有关闭 阅读全文
posted @ 2022-07-07 09:26 ziff123 阅读(80) 评论(0) 推荐(0)
摘要: 1、nuget引用 Microsoft.EntityFrameworkCore Microsoft.EntityFrameworkCore.SqlServer Microsoft.EntityFrameworkCore.SqlServer.Design Microsoft.EntityFramewo 阅读全文
posted @ 2022-07-03 22:22 ziff123 阅读(407) 评论(0) 推荐(0)
摘要: 1、Nuget引入Castle.Core 2、新建CustomInterceptor类,实现IInterceptor接口 1 using Castle.DynamicProxy; 2 using System; 3 using System.Collections.Generic; 4 using 阅读全文
posted @ 2022-06-19 16:15 ziff123 阅读(153) 评论(0) 推荐(0)
摘要: 1、Nuget引入 Autofac、Autofac.Extensions.DependencyInjection 2、Program.cs里面添加注入配置 { //第一种方式注入 builder.Host.UseServiceProviderFactory(new AutofacServicePro 阅读全文
posted @ 2022-06-19 14:54 ziff123 阅读(154) 评论(0) 推荐(0)
摘要: 一、支持属性注入 1、创建控制台程序 2、Nuget引入AutoFace 3、创建接口层Business.IServices,包含以下几个接口 IMicrophone.cs 1 namespace Business.IServices 2 { 3 public interface IMicropho 阅读全文
posted @ 2022-05-22 16:44 ziff123 阅读(1059) 评论(0) 推荐(0)
摘要: 1、创建控制台应用程序,Nuget引入Autofac 2、创建接口IMicrophone 1 namespace Business.IServices 2 { 3 public interface IMicrophone 4 { 5 6 } 7 } 3、创建Microphone类 1 using B 阅读全文
posted @ 2022-05-21 23:05 ziff123 阅读(702) 评论(0) 推荐(0)
摘要: .net core6内置了IOC容器ServiceCollection可以直接使用 1、创建IMicrophone接口 1 namespace Business.IServices 2 { 3 public interface IMicrophone 4 { 5 6 } 7 } 2、创建Microp 阅读全文
posted @ 2022-05-21 22:18 ziff123 阅读(494) 评论(0) 推荐(0)
摘要: 1、创建控制台应用程序 2、Nuget引用Microsoft.Extensions.DependencyInjection 3、创建Business.IServices类库 创建接口IPower、IMicrophone.cs、IHeadphone 1 using System; 2 using Sy 阅读全文
posted @ 2022-05-14 22:48 ziff123 阅读(775) 评论(0) 推荐(0)