C# generic type with obligatory property

Solution 1:

The way to handle requirements like this in dot net is to use generic constraints and an interface:

public interface IConfig // You might want to change this name
{
   int Id {get;} // data type assumed to be int, can be anything you need of course
}

....

public static Task UpdateConfig<T>(T config) where T : IConfig
... rest of the code here