コード例 #1
0
        public async Task <ActionResult> Post([FromBody] InsertSellCarDto value)
        {
            var sellCar = value.ToSellCar();

            _ = _ctx.SellCars.Add(sellCar);
            _ = await _ctx.SaveChangesAsync();

            return(Ok(sellCar));
        }
コード例 #2
0
        public async Task <ActionResult> Post([FromBody] InsertUserProfileDto value)
        {
            var userProfile = value.ToUserProfile();

            _ = _ctx.UserProfiles.Add(userProfile);
            _ = await _ctx.SaveChangesAsync();

            return(Ok(userProfile));
        }