public ICommandResult Handle(CreateCommandKnowledgeWall command) { var knowledgeWall = new KnowledgeWall(Guid.NewGuid(), command.TextKnowledgeWall); // Salva no banco _repository.Create(knowledgeWall); // Retorna o resultado return(new GenericCommandResult(true, "KnowledgeWall salvo", knowledgeWall)); }
public void Update(KnowledgeWall Object) { this._context.Entry(Object).State = EntityState.Modified; this._context.SaveChanges(); }
public void Create(KnowledgeWall Object) { this._context.KnowledgeWall.Add(Object); this._context.SaveChanges(); }