示例#1
0
 protected virtual void Inserted(object sender, NotificatorEntityArgs <TEntity> e)
 {
     _operationsRepository.Insert(new TOperation
     {
         User          = e.User,
         Entity        = e.Entity,
         Object        = e.Entity.ToXmlString(),
         OperationType = OperationType.Insert
     });
 }
        public ActionResult <OperationsDTO> PostOperation(OperationsDTO opDTO)
        {
            var        opType = _IOperationsTypeRepository.Select(opDTO.OperationsTypeId);
            Operations op     = new Operations(new Designation(opDTO.Name), new Details(opDTO.ToolDesc), new Duration(opDTO.Duration), opType);

            _IOperationsRepository.Insert(op);

            return(CreatedAtAction(nameof(GetAllOperations), new { id = op.Id }, op));
        }