c# 4.0 - Impromptu: Could not load type because it attempts to implement a class as an interface -
i have started using impromptu after recommendation on stack.
i believe have implemented correctly getting error "could not load type because attempts implement class interface"
in portable class library have following model:
public class route { public user user { get; set; } } public class user { public name name { get; set; } } public class name { public string title { get; set; } public string firstname { get; set; } public string middlename { get; set; } public string lastname { get; set; } }
and have created following iclasses in mvc project:
public class iroute { public iuser user { get; set; } } public class iuser { public iname name { get; set; } } public class iname { [required] public string firstname { get; set; } [required] public string lastname { get; set; } }
and in controller have following being sent view:
route sendthis = new route(); return view(sendthis.actlike<iroute>());
but error "could not load type because attempts implement class interface"
i cannot work out have done wrong. can please?
thanks
i hadn't changed local classes "interface".
public interface iroute { iuser user { get; set; } } public interface iuser { iname name { get; set; } } public interface iname { [required] string firstname { get; set; } [required] string lastname { get; set; } }
Comments
Post a Comment