脚手架的问题 [英] problem in scaffolding

查看:182
本文介绍了脚手架的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计

i我正在使用脚手架生成一个视图,我可以编辑,删除记录,我的表包含三个字段的用户名,密码和电子邮件,我将其作为列表传递给视图渲染它!

我面临的问题是,编辑删除操作会显示用户名和密码,但不会显示相应的电子邮件列!

i guess its due电子邮件列是主键,但有没有其他替代方法可以执行所需的操作而不改变我的表格结构!!

如果有的话请告诉我





Hey guys
i am using scaffolding to generate a view where i can edit ,delete records,my table consists of three fields the username ,password and email which i pass as a list to the view to render it!
the problem i am facing is that the username and password are displayed along the edit delete actions but the respective email columns are not displayed!
i guess its due to the the email column being the primary key,but is there any other alternative to perform the desired action without altering the structure of my table!!
please let me know if any


amespace mvcapplication_scaffold_.Controllers
{
    public class homeController : Controller
    {
        DataClasses1DataContext dd = new DataClasses1DataContext();
        //
        // GET: /home/

        public ActionResult Index()
        {
            var employeelist = dd.logins.ToList();
            return View(employeelist);
        }

    }
}

推荐答案

这篇关于脚手架的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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