C#设计模式-抽象工程模式(2)
来源:互联网 发布:淘宝怎么营销推广 编辑:程序博客网 时间:2024/05/17 06:59
using System;using System.Collections.Generic;using System.Text;namespace 抽象工厂模式{ class Program { static void Main(string[] args) { User user = new User(); SqlserverUser su = new SqlserverUser(); su.Insert(user); su.GetUser(1); Console.Read(); } } class User { private int _id; public int ID { get { return _id; } set { _id = value; } } private string _name; public string Name { get { return _name; } set { _name = value; } } } class SqlserverUser { public void Insert(User user) { Console.WriteLine("在Sqlserver中给User表增加一条记录"); } public User GetUser(int id) { Console.WriteLine("在Sqlserver中根据ID得到User表一条记录"); return null; } }}
1 0
- C#设计模式-抽象工程模式(2)
- C#设计模式-抽象工程模式(1)
- C#设计模式-抽象工程模式(3)
- C#设计模式-抽象工程模式(4)
- C#设计模式-抽象工程模式(5)
- C#设计模式-抽象工程模式(6)
- 设计模式(六)抽象工程模式
- 设计模式之抽象工程
- 设计模式之禅-抽象工程模式
- 设计模式(2)------抽象工厂模式
- 设计模式(2)-抽象工厂模式
- 设计模式(2)--抽象工厂模式
- c#设计模式- Abstract Factory模式(抽象工厂)
- C#设计模式02-抽象工厂模式(附源码)
- C#设计模式(四)抽象工厂模式
- C# 设计模式 之 抽象工厂模式
- C#设计模式之抽象工厂模式
- c#设计模式--抽象工厂模式
- win7下安装配置tomcat,java运行环境
- CSAPP第八章-异常控制流(二)
- android开发禁止横屏(所有activity)
- 获取客户端ip地址的方法
- android 简单记事本开发(一)
- C#设计模式-抽象工程模式(2)
- 使用JAVA注解和反射模拟spring的IOC
- 【JqGrid】JqGrid API 中文说明及用法
- angularjs解决播放语音出错的问题
- ListView的单条设置成fragment的写法
- Quartz——Calendar详解
- 使用SpringMVC注解ResponseBody返回Json数据可能遇到的问题
- idea设计字体大小注释颜色以及语言级别
- 判断一个字符串String是否是由数字组成,采用正则表达式