首页 > TAG信息列表 > ISysUserRepository
.net core 连接mysql 四:建立 ISysUserRepository
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using fjxw.model;namespace fjxw.dal{ public interface ISysUserRepository:IDisposable { IEnumerable<sysuser> GetUsers();.net core 连接mysql 五:创建SysUserRepository实现接口ISysUserRepository
using fjxw.model;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace fjxw.dal{ public class SysUserRepository : ISysUserRepository { private CoreDbContext context;.net core 连接mysql 七:startup.cs数据库和ISysUserRepository添加到容器
using Microsoft.AspNetCore.Builder;using Microsoft.AspNetCore.Hosting;using Microsoft.Extensions.Configuration;using Microsoft.Extensions.DependencyInjection;using Microsoft.Extensions.Hosting;using System;using System.Collections.Generic;using System.net core 连接mysql 八:HomeController注入ISysUserRepository
using fjxw.echarge.Models;using Microsoft.AspNetCore.Mvc;using Microsoft.Extensions.Logging;using System;using System.Collections.Generic;using System.Diagnostics;using System.Linq;using System.Threading.Tasks;using fjxw.model;using fjxw.dal;namespace