Beispiel #1
0
 public ActionResult <Resultado> PutA([FromBody] Projeto Projeto)
 {
     if (this._service.UserProjectCan(Projeto.Id, User, ProjectPermissions.Administrator))
     {
         var ProjetoOld = _service.Obter(Projeto.Id);
         _service._context.Entry(ProjetoOld).State = EntityState.Detached;
         var result = _service.AtualizaDataInicio(Projeto);
         if (result.Sucesso)
         {
             this.CreateLog(this._service, Projeto.Id, _service.Obter(Projeto.Id), ProjetoOld);
         }
         return(result);
     }
     return(Forbid());
 }