This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Type[] type = { typeof(string) }; | |
var genericType = typeof(List<>).MakeGenericType(type); | |
var instance = Activator.CreateInstance(genericType); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ef | |
[Fact] | |
public async Task Test() | |
{ | |
var agent = new Agent() | |
{ | |
Id = 9, | |
Name = "new2" | |
}; | |
_db.Agents.Attach(agent); |