using System;
using System.Collections.Generic;
namespace mymodels
{
public abstract class mybase
{
public string v1 {get; set;}
}
public class derivedA
Your interface isn't covariant - it needs to be explicitly covariant when you declare it. So this:
interface iBaseService<T> where T : mymodels.mybase
should be:
interface iBaseService<out T> where T : mymodels.mybase
... except that you should also follow .NET naming conventions, using PascalCase for namespace, type and method names. Your code is very unconventional at the moment.