如何在mvc 4中为api控制器创建控制器和视图页面 [英] how create controller and view page for api controller in mvc 4

查看:167
本文介绍了如何在mvc 4中为api控制器创建控制器和视图页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hii



im mvc新手,我已经用api读/写创建了一个api控制器,并在api方法中编写了代码,用于数据库的读写事务使用实体框架work.after什么做我无法做。我想知道如何在我的控制器和view.pls中使用那些api方法帮助我

谢谢Amrit

hii

i m new to mvc,i have created a api controller with api read/write and write thje code inside the api methods for read and write transaction with database using entity frame work.after that what to do i m unable to do.i want to know how to use those api methods in my controller and view.pls help me
Thanks Amrit

推荐答案

您不在控制器中使用这些方法。你的控制器提供那些方法!你必须编写决定这些方法的代码。



说真的,拿起一本关于MVC和Web API的书。
You don't use those methods in your controller. Your controller PROVIDES those methods! You have to write the code that determines what those methods are going to do.

Seriously, pick up a book on MVC and Web API.


这篇关于如何在mvc 4中为api控制器创建控制器和视图页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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