3层架构帮助asp.net [英] 3 tier architecture help asp.net

查看:69
本文介绍了3层架构帮助asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在asp.net中创建了3层架构。



1 .Business Tier

2.Date Tier

3.Application Tier



我已经成功完成了这个项目。

我还正确地添加了对我的dll的引用。



应用程序层

引用了业务和数据等级



业务层引用数据层



和数据层正在调用我的数据库。 />


我添加了参考,添加了每个dll作为参考。





i有一些问题



ex。如果我尝试导航到我的功能定义(例如F12,或右键单击功能并单击

转到定义)。

它带我编码元数据而不是实际的代码。我不知道我哪里出错了。

请尽可能指导我。



Hello all,

I have created 3 Tier architecture in asp.net.

1.Business Tier
2.Date Tier
3.Application Tier

I have compelted this project successfully.
I have also added references of my dll correctly.

Application Tier
is referenced with BUSINESS and Data Tier

Business Tier is referenced with Data Tier

and Data Tier is calling my database.

I have added reference by adding dll of each as reference.


i have some issues

ex. If i try to navigate to my function defination(ex. F12,or right click on function and click on
Go To Defination) .
It is taking me to code metadata instead of actual code. i dont know where i went wrong.
Please guide me if possible.

    This code is in my presentation layer
public void GetMenu(){
Handler mh = new Handler();
        DataSet ds = mh.GetMenu(mm);
}

This code is in my Business layer

public class Handler
    {
   public DataSet GetMenu(MenuMaster mm)
        {
            return DbAc.get_Menu(mm);
        }
}

This code is in my Data layer

        public DataSet get_Menu(MenuMaster sm)
        {
            SqlParameter[] ParamList = new SqlParameter[2];

            ParamList[0] = new SqlParameter("@Id", SqlDbType.VarChar, 50);
            ParamList[0].Value = sm.ID;

            ParamList[1] = new SqlParameter("@GroupId", SqlDbType.VarChar);
            ParamList[1].Value = sm.GroupId;

            return SqlDBHelper.ExecuteDataSet("getMenu", CommandType.StoredProcedure, ParamList);
        }


if i right click on GetMenu function and try to click on go to code defination, its taking me to metadata not actual code


Thanks,
Regards,
SUNIL MALI.

推荐答案

Ohhhh ...

最后我在youtube视频上找到答案。



我做的错误是



i是添加我的dll参考。

ex。右键单击项目 - >添加参考 - >浏览 - >导航到我的业务层dll->添加它

解决方案:



在添加引用而不是添加dll作为参考时我应该添加项目作为参考。

如果你添加dll作为参考它肯定会显示元数据,但如果你添加项目作为参考它将带你到实际的代码。



步骤:

右键点击项目 - >添加参考 - >转到项目部分 - > ;检查商业图层的复选框





我为此苦苦挣扎。

但youtube video救了我。





谢谢,

所有回复此帖的人。
Ohhhh...
Finally i found answer on youtube video.

Mistake i did was

i was adding reference of my dll.
ex. right click on project ->Add reference->Browse->Navigate to my business layer dll->add it
Solution:

while adding reference instead of adding dll as reference i should add project as reference.
If you add dll as reference it will definately show you metadata, but if you add project as a reference it will take you to actual code.

Steps:
right click on project ->Add reference->Go to project section->check checkboxes of your business layer


I was struggling so long for this.
but youtube video saved me.


Thanks,
Everyone who replied here.


有人请帮助..

如果你还没有理解或有问题请告诉我......
Somebody please help..
Still if u have not understood or have some question let me know...


这篇关于3层架构帮助asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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