Beispiel #1
0
        public async Task <IActionResult> PostKhachHang([FromBody] CreateKHRequest request)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            KhachHang khachHang = service.CreateKhachHang(request);

            return(CreatedAtAction("GetKhachHang", new { id = khachHang.IdKhachHang }, khachHang));
        }