Closed mirsahibmovsumov closed 3 years ago
You can either add a static Parse(string value)
method on UpdateUserProjectDto
or create a converter deriving from ArgumentValueConverter
and specify it in the attribute.
First approach is easier:
public class UpdateUserProjectDto
{
public int ProjectId { get; set; }
public string ProjectName { get; set; }
public bool IsBound { get; set; }
public static UpdateUserProjectDto Parse(string value)
{
// Parse the value from string here
var projectId = ...;
var projectName = ...;
var isBond = ...;
return new UpdateUserProjectDto{ ProjectId = projectId, ProjectName = projectName, IsBound = isBond };
}
}
Thanks a lot It seems there's no generic way to pass a collection of objects
Nope, only if they have Parse(...)
.
There is a CLI command like below
I wanna pass a list of UpdateUserProjectDto as Projects but I cannot do it. Could you suggest to me how to add this?