Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
        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));
        }
Ejemplo n.º 5
0
        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));
        }
Ejemplo n.º 6
0
 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)));
 }