C
C#10mo ago
TJacken

CQRS command with complex structure

Is it okay to have command like this, is it bad approach for CQRS to have DTO inside Command?
public class CreateTemplateCommand : IRequest<int>
{
public string Name { get; set; } = default!;

public string ChatSystemPrompt { get; set; } = default!;

public string Definition { get; set; } = default!;

public double Temperature { get; set; }

public double TopP { get; set; }

public List<TagDto> TagDtos { get; set; } = default!;
}
public class CreateTemplateCommand : IRequest<int>
{
public string Name { get; set; } = default!;

public string ChatSystemPrompt { get; set; } = default!;

public string Definition { get; set; } = default!;

public double Temperature { get; set; }

public double TopP { get; set; }

public List<TagDto> TagDtos { get; set; } = default!;
}
1 Reply
Scytale
Scytale10mo ago
depends on what do you want to do with your tags... If you create (if they don't exist) them on the fly... why not. If it's only a list of tag to reference them in your newly created template, just use a list of tag ids, no ?
Want results from more Discord servers?
Add your server