public EntityPackTS ConstructFromMany([Required, FromBody] MultiOperationRequest request) { var type = request.lites.Select(l => l.EntityType).Distinct().Only() ?? TypeLogic.GetType(request.type); var entity = OperationLogic.ServiceConstructFromMany(request.lites, type, request.GetOperationSymbol(type), request.args); return(SignumServer.GetEntityPack(entity)); }
public EntityPackTS ConstructFromMany(MultiOperationRequest request) { var type = request.type == null ? null : TypeLogic.GetType(request.type); var entity = OperationLogic.ServiceConstructFromMany(request.lites, type, request.GetOperationSymbol(type), request.args); return(SignumServer.GetEntityPack(entity)); }
public EntityPackTS?ConstructFromMany([Required, FromBody] MultiOperationRequest request) { var type = request.Lites.Select(l => l.EntityType).Distinct().Only() ?? TypeLogic.GetType(request.Type); var op = request.GetOperationSymbol(type); var entity = OperationLogic.ServiceConstructFromMany(request.Lites, type, op, request.ParseArgs(op)); return(entity == null ? null : SignumServer.GetEntityPack(entity)); }
public ActionResult ConstructFromMany() { var lites = this.ParseLiteKeys <Entity>(); OperationSymbol operationSymbol = lites.Select(a => a.EntityType).Distinct().Select(type => this.GetOperationKeyAssert(type)).Distinct().SingleEx(); Entity entity = OperationLogic.ServiceConstructFromMany(lites, lites.First().EntityType, operationSymbol); return(this.DefaultConstructResult(entity, operation: operationSymbol)); }
public ActionResult ConstructFromMany() { OperationSymbol operationSymbol = this.GetOperationKeyAssert(); var lites = this.ParseLiteKeys <Entity>(); Entity entity = OperationLogic.ServiceConstructFromMany(lites, lites.First().EntityType, operationSymbol); return(this.DefaultConstructResult(entity, operation: operationSymbol)); }
public Entity ConstructFromMany(IEnumerable <Lite <IEntity> > lites, Type type, OperationSymbol operationKey, params object[] args) { return(Return(MethodInfo.GetCurrentMethod(), operationKey.ToString(), () => OperationLogic.ServiceConstructFromMany(lites, type, operationKey, args))); }