示例#1
0
        public override IHttpActionResult Post(Supplier model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (string.IsNullOrWhiteSpace(model.Id))
            {
                model.Id = Guid.NewGuid().ToString();
            }
            model.Active = true;

            _service.CreateAsTenant(model);

            return(Ok(model.Id));
        }