Clothes.DAL/AccountService.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using Clothes.IDAL;
using Clothes.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Clothes.DAL
{
    public class AccountService : IAccountService
    {/// <summary>
     /// 用户名是否已注册
     /// </summary>
     /// <param name="userName">用户名</param>
     /// <returns></returns>

    /// <summary>
    /// 账户数据服务类
    /// </summary>
        /// <summary>
        /// 用户名是否已注册
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <returns></returns>
        public bool ExistUserName(string userName)
        {
            ClothesContext dbContext = new ClothesContext();
            return dbContext.CLLogin.Any(m => m.UserName == userName);
        }

        /// <summary>
        /// 手机号是否已注册
        /// </summary>
        /// <param name="mobileNumber">手机号</param>
        /// <returns></returns>
        public bool ExistMobileNumber(string mobileNumber)
        {
            ClothesContext dbContext = new ClothesContext();
            return dbContext.CLLogin.Any(m => m.MobileNumber == mobileNumber);
        }

        /// <summary>
        /// 通过用户名查找登录信息
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <returns></returns>
        public CLLogin FindByUserName(string userName)
        {
            ClothesContext dbContext = new ClothesContext();
            return dbContext.CLLogin.SingleOrDefault(m => m.UserName == userName);
        }

        /// <summary>
        /// 通过手机号查找登录信息
        /// </summary>
        /// <param name="mobileNumber">手机号</param>
后面还有 44 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。