多层应用程序(N层编程) [英] Multilayer applications(N-Tier programming)

查看:63
本文介绍了多层应用程序(N层编程)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以向数据库添加信息的程序,我想将此程序转换为多层应用程序,我该怎么办?
这是我的代码:

I have a program that can add information to the databaseand i want to convert this program to Multilayer Applications what can i do?
this my code:

userEntities am = new userEntities();
     Table_1 ta = new Table_1();
     ta.ID = Convert.ToInt32(textBox6.Text);
     ta.name = textBox9.Text;
     ta.last_name = textBox8.Text;
     ta.phon_number = maskedTextBox2.Text;
     ta.adress = textBox7.Text;
     am.AddToTable_1(ta);
     am.SaveChanges();
     showdata();


帮我开坦克


help me tanks

推荐答案

请参阅 http://en.wikipedia.org /wiki/Multitier_architecture [^ ].

作为起点:
1.确定代码中的图层.
2.重新排列,使一层仅取决于下一层.

干杯
安迪
See http://en.wikipedia.org/wiki/Multitier_architecture[^].

As a starting point:
1. Identify what your layers are in your code.
2. Re-arrange such that one layer depends on the next layer only.

Cheers
Andi


这篇关于多层应用程序(N层编程)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆