コード例 #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));
        }
コード例 #2
0
        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 { }));
        }