Beispiel #1
0
        public MetaTimeMachineEntity toEntity(MetaTimeMachineCreateRequest request)
        {
            MetaTimeMachineEntity entity = new MetaTimeMachineEntity();

            entity.TimeMachineId   = request.TimeMachineId != null ? request.TimeMachineId.Value : 0;
            entity.TimeMachineName = request.TimeMachineName;

            return(entity);
        }
Beispiel #2
0
        public MetaTimeMachineCreateResponse Create([FromBody] MetaTimeMachineCreateRequest request)
        {
            MetaTimeMachineCreateResponse response = new MetaTimeMachineCreateResponse();

            metaTimeMachineRepository.Create(metaTimeMachineConvertor.toEntity(request));

            theTimeMachineMeta.Refresh();

            response.Status = 1;
            return(response);
        }