using System;
using System.ComponentModel.DataAnnotations;
namespace HelloWorldMvcApp
{
public interface IParent<out T>
where T : IChild
}
public class Parent<T> : IParent<T>
public class Child : IChild
public interface IChild
@model HelloWorldMvcApp.IParent<HelloWorldMvcApp.IChild>
@{
Layout = null;
<div>
works
</div>
using System.Web.Mvc;
using System.Collections.Generic;
public class HomeController : Controller
public ActionResult Index()
return View(new Parent<Child>());