JuCheap.Service/Abstracts/RoleService.Partial.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*******************************************************************************
* Copyright (C) JuCheap.Com
*
* Author: dj.wong
* Create Date: 01/03/2023 10:07:34
* Description: Automated building by service@JuCheap.com
*
* Revision History:
* Date Author Description
*
*********************************************************************************/
using AutoMapper;
using EntityFramework.Extensions;
using JuCheap.Core;
using JuCheap.Core.Extentions;
using JuCheap.Entity;
using JuCheap.Entity.Base;
using JuCheap.Service.Dto;
using Mehdime.Entity;
using System;
using System.Collections.Generic;
using System.Data.Entity.Migrations;
using System.Linq;
using System.Linq.Expressions;
namespace JuCheap.Service.Abstracts
{
/// <summary>
/// Role业务契约
/// </summary>
public partial class RoleService : ServiceBase<RoleEntity>, IDependency, IRoleService
{
#region 构造函数注册上下文
public IDbContextScopeFactory _dbScopeFactory {get;set;}
//private readonly IDbContextScopeFactory _dbScopeFactory;
//public RoleService(IDbContextScopeFactory dbScopeFactory)
//{
// _dbScopeFactory = dbScopeFactory;
//}
#endregion
#region IRoleService 接口实现
/// <summary>
/// 添加role
/// </summary>
/// <param name="dto">role实体</param>
/// <returns></returns>
public string Add(RoleDto dto)
{
using (var scope = _dbScopeFactory.Create())
{
var db = GetDb(scope);
var dbSet = GetDbSet(db);
后面还有 229 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
