コード例 #1
0
        public async Task <int> InsertParty(InsertPartyRequest request)
        {
            var param = new ParamBuilder()
                        .WithParam("Name", request.Name)
                        .WithParam("Location", request.Location)
                        .WithParam("StartTime", request.StartTime);

            var newId = await db.Insert(param);

            return(newId.ToInt());
        }
コード例 #2
0
        public async Task <Response <int> > Handle(CreateParty command)
        {
            var request = new InsertPartyRequest
            {
                Name      = command.Name,
                Location  = command.Location,
                StartTime = command.StartTime
            };

            var newPartyId = await _dataProvider.InsertParty(request);

            return(SuccessHandler.ReturnInsertSuccess(newPartyId, EntityName));
        }