日期:2014-05-17  浏览次数:20415 次

初学MVC3,有些疑惑,请前辈解惑一下:)
1:MVC项目中既有视图,又有控制器,那么,应该按几层来搭建整个项目呢?分别对应什么?

2:存储库,接口的实现,作用体现在哪里?

3:能够通过EF去查询数据库中的View吗?难道复杂的关联查询每次都要在后写用linq或者lamda写吗?
原先在数据库中执行的函数,或者存储过程,现在放到项目中实现,不是会增加服务器的压力吗?

4:控制器,统一放在MVC下的Controllers文件夹中;视图,统一放在Views文件夹中。那么,整个系统的功能模块的层次性,或者叫级别性,无法做到一目了然吗?比如 组织机构/{用户管理,部门管理,职位管理}

希望能有人帮我

另外,顺便带个问题求解决~~

JScript code
function ChangePwd() {
            window.showModalDialog('../Account/ChangePassWord', '', 'dialogWidth:650px;dialogHeight:340px;dialogTop:' + new String((screen.height - 420) / 2) + 'px;dialogLeft:' + new String((screen.width - 650) / 2) + 'px;resizable:no;status:no;scroll:no;help:no;unadorned:yes;');
        }

用JS弹出一个窗口进行密码的修改

HTML code
@Html.BeginForm("ChangePassWord","Account", FormMethod.Post)
                                <table width="100%" border="0px" cellspacing="0px" cellpadding="0px">
                                    <tr>
                                        <td width="20%" height="30px" align="right" bgcolor="#f2f2f2" class="left_txt2">
                                            用户名:
                                        </td>
                                        <td width="3%" bgcolor="#f2f2f2">
                                            &nbsp;
                                        </td>
                                        <td width="32%" height="30px" bgcolor="#f2f2f2">
                                            @Html.TextBoxFor(m => m.UserName, new { name = "txt_username", size = "20",@readonly="readonly" })
                                        </td>
                                        <td width="45%" height="30px" bgcolor="#f2f2f2" class="left_txt">
                                            准备修改密码的所属帐号
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="30px" align="right" class="left_txt2">
                                            当前密码:
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td height="30px">
                                            @Html.TextBoxFor(m => m.OldPassword, new { name = "txt_oldpassword", size="20" })
                                        </td>
                                        <td height="30px" class="left_txt">
                                            当前密码&nbsp;&nbsp;<span style=" font-size:12px; color:Red;">@Html.ValidationMessageFor(m => m.OldPassword)</span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="30px" align="right" bgcolor="#f2f2f2" class="left_txt2">
                                            新密码:
                                        </td>
                                        <td bgcolor="#f2f2f2">
                                            &nbsp;