public async Task <IActionResult> Post([FromBody] LoaiHinhThucThuDTO model)
 {
     using (var context = new UserProfileDbContext())
     {
         context.LoaiHinhThucThus.Add(new LoaiHinhThucThu
         {
             Id = model.Id,
             TenLoaiHinhThucThu = model.TenLoaiHinhThucThu
         });
         //context.Database.ExecuteSqlCommand("SET IDENTITY_INSERT [dbo].[UserProfiles] ON");
         return(Ok(await context.SaveChangesAsync()));
     }
 }
        public async Task <IActionResult> Put(int id, [FromBody] LoaiHinhThucThuDTO model)
        {
            using (var context = new UserProfileDbContext())
            {
                var user = await context.LoaiHinhThucThus.FirstOrDefaultAsync(x => x.Id.Equals(id));

                if (user == null)
                {
                    return(NotFound());
                }
                user.Id = model.Id;
                user.TenLoaiHinhThucThu = model.TenLoaiHinhThucThu;
                return(Ok(await context.SaveChangesAsync()));
            }
        }