How can I use the command in this situation when needs to create one of two objects #1004
Replies: 2 comments
-
Can you please reformulate your question. |
Beta Was this translation helpful? Give feedback.
-
Dear, public class CreateSensorCommand : IRequest<string>
{
public CreateSensorCommand (
string name,
string description,
IEnumerable<CreateRegisterCommand> registers
)
{
Name = name;
Description = description;
Registers = registers;
}
public string Name { get; }
public string Description { get; }
public IEnumerable<CreateRegisterCommand> Registers { get; }
} Here is an example where I create a new sensor in the system and add many registers . The register itself can be created without a sensor, but vice versa is not possible. How correct is it to use a command within a command? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a situation where two objects are created separately, but when one object should be created with the second, what should I do?
Beta Was this translation helpful? Give feedback.
All reactions