コード例 #1
0
 public ResponseWrapper<CreateGetAllEndPointModel> CreateGetAllEndPoint(CreateGetAllEndPointInputModel model)
 {
     var newEntity = new GetAllEndPoint
     {
         EndPointId = model.EndPointId,
         EndPoint = 
                 new EndPoint
                 {
                     Name = model.EndPoint.Name,
                     Route = model.EndPoint.Route,
                     CustomEndPoint = model.EndPoint.CustomEndPoint,
                     EndPointType = model.EndPoint.EndPointType,
                     RootEntityEntityId = model.EndPoint.RootEntityEntityId,
                     ServiceId = model.EndPoint.ServiceId,
                     EndPointModelId = model.EndPoint.EndPointModelId,
                     RootEndPointToRootEntityDataSourceId = model.EndPoint.RootEndPointToRootEntityDataSourceId,
                 },
     };
     
     context
         .GetAllEndPoints
         .Add(newEntity);
     
     context.SaveChanges();
     var response = new CreateGetAllEndPointModel
     {
         GetAllEndPointId = newEntity.GetAllEndPointId,
         EndPointId = newEntity.EndPointId,
     };
     
     return new ResponseWrapper<CreateGetAllEndPointModel>(_validationDictionary, response);
 }
コード例 #2
0
        public dynamic CreateGetAllEndPoint([FromBody] CreateGetAllEndPointInputModel model)
        {
            var orchestrator = new GetAllEndPointOrchestrator(new ModelStateWrapper(this.ModelState));

            return(orchestrator.CreateGetAllEndPoint(model).GetResponse());
        }