Bll/User.cs

(开头部分) 2KB

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

using System;
using System.Data;
using ElfinNet.Model;
using ElfinNet.IDAL;
using ElfinNet.DALFactory;

namespace ElfinNet.BLL
{
	//该源码下载自www.51aspx.com(51aspx.com)
    /// <summary>
    /// BLL Layer For dbo.User.
    /// </summary>
    public class User
    {
		#region Constructor
		/// <summary>
		/// Default constructor
		/// </summary>
		public User()
		{
		}
		#endregion

        #region Interfaces
		
		/// <summary>
		/// Insert a new user record to database.
		/// </summary>
		/// <param name="oUserInfo"></param>
		/// <returns></returns>
		public int Insert(UserInfo oUserInfo)
		{
			// Validate input
			if (oUserInfo == null)
				return 0;

			// Insert an instance of the User DAL using the DALFactory
			IUser dal = DALFactory.User.Create();

			// Use the dal to insert a new record 
			return dal.Insert(oUserInfo);
		}

        /// <summary>
		/// Gets a user record from the database.
		/// </summary>
		/// <param name="userName"></param>
		/// <returns></returns>
		public UserInfo Get(string userName)
		{
			// Validate input
			if(userName.Length==0)
				return null;

			// Get an instance of the User DAL using the DALFactory
			IUser dal = DALFactory.User.Create();

			// Use the dal to get a record 
			return dal.Get(userName);
		}
后面还有 58 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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