converting an interface to a type in MVC

Posted by danielovich on Stack Overflow See other posts from Stack Overflow or by danielovich
Published on 2010-05-14T09:22:03Z Indexed on 2010/05/14 9:24 UTC
Read the original article Hit count: 178

Filed under:
|

Hi.

I have a small isuse regarding an interface.

Consider this code:

[HttpPost()]
public void Update(IAuctionItem item) {
    RedirectToAction("List");
}

Whenever I call this I get an exception saying I can't create an instance of type which i totally correct. But is there a way of telling what the interface should map to without actually using the concrete type ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-mvc