请教几句话的意思.谢谢.三层架构
1.
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using HroaNet.Model;
namespace HroaNet.DAL
{
public class IUser : ExecuteSql
{
public IUser() : base(Getconfiguration.GetConnectionString())
{
}
public int InsertUser(string sql)
......
}
上面是程序的头几句,有疑问的是 public IUser() : base(Getconfiguration.GetConnectionString())这一句.
base()括号里加上连接语句是干吗用的?请高手指点,不要笑话,新手.
2.user 是写好的一个类.里面只有username,id,.password三个属性,请高手能讲一下下面这个类是做什么用的吗?谢谢
public class UserCollection : CollectionBase
{
public User this[int index]
{
get { return (User)List[index]; }
set { List[index] = value; }
}
public int Add(User value)
{
return (List.Add(value));
}
public int IndexOf(User value)
{
return (List.IndexOf(value));
}
public void Insert(int index, User value)
{
List.Insert(index, value);
}
public void Remove(User value)
{
List.Remove(value);
}
public bool Contains(User value)
{
return (List.Contains(value));