예제 #1
0
        public Mapping.Collection Create(string xmlTagName, XmlNode node, string className,
                                         string path, PersistentClass owner, System.Type containingType, IDictionary <string, MetaAttribute> inheritedMetas)
        {
            CreateCollectionCommand command = createCollectionCommands[xmlTagName];

            return(command(node, className, path, owner, containingType, inheritedMetas));
        }
        public async Task <IActionResult> Post([FromBody] CreateCollectionCommand command)
        {
            if (!this.ModelState.IsValid)
            {
                return(this.BadRequest(this.ModelState));
            }

            var response = await this._mediator.Send(command);

            return(this.Created(Url.RouteUrl("GetCollectionById", new { id = response.Id }), new { }));
        }