How to start mvc Layer for this

Posted by Jayakumars under ASP.NET on 7/12/2013 | Points: 10 | Views : 1091 | Status : [Member] [MVP] | Replies : 4
hi

How to implemented Scaffolding a CRUD interface in mvc3 Code First Method
any one post this

Mark as Answer if its helpful to you


Responses

Posted by: Jitendrasoft09 on: 7/12/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello Jay,

As visual studio gives layer for MVC pattern, you can create or change layer to create CRUD operation, refer below link for more information-

http://weblogs.asp.net/scottgu/archive/2011/05/05/ef-code-first-and-data-scaffolding-with-the-asp-net-mvc-3-tools-update.aspx

Hope you are clear..

Jitendra Kumar
If my post helps you, plz mark as an answer.

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 7/12/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
Jitendrasoft09

i tried this thanks for your response i need how to use interface in my MVC3

how to implemented interface and repository



Mark as Answer if its helpful to you

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jitendrasoft09 on: 7/13/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Jay,
good question Jay, as repository class makes you easy to test with without affecting your database using Interface, look into below code-

public interface IMyRepository

{
List<Customer> GetAllCustomers();
Customer GetCustomerByID(int _id);
void UpdateCustomer(Customer _cust);
void DeleteCustomer(Customer _cust);

}


Jitendra Kumar
If my post helps you, plz mark as an answer.

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 7/13/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
Jitendrasoft09

Thanks for your responses can you create sample application(MVC3) with interface and
attached here thats very useful for me.

Mark as Answer if its helpful to you

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response