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));
        }
Exemple #2
0
 public void Update(KnowledgeWall Object)
 {
     this._context.Entry(Object).State = EntityState.Modified;
     this._context.SaveChanges();
 }
Exemple #3
0
 public void Create(KnowledgeWall Object)
 {
     this._context.KnowledgeWall.Add(Object);
     this._context.SaveChanges();
 }