public ICommandResult Handle(CreateNodeCommand command) { //Fail Fast Validation command.Validate(); if (command.Invalid) { return(new GenericCommandResult(false, Messages.Ex_ExceptionGeneric, command.Notifications)); } //Gera Node var Node = new Node(command.Title, command.RoadMapId); //Salva no banco _repository.Create(Node); return(new GenericCommandResult(true, Messages.Act_Save, Node)); }
public Node Create(Node node) { return(_nodeRepository.Create(node)); }
public Node Create(Node model) { _repository.Create(model); _repository.SaveCganges(); return(model); }