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); }
public dynamic CreateGetAllEndPoint([FromBody] CreateGetAllEndPointInputModel model) { var orchestrator = new GetAllEndPointOrchestrator(new ModelStateWrapper(this.ModelState)); return(orchestrator.CreateGetAllEndPoint(model).GetResponse()); }