Failed to update user: Optimistic concurrency failure, object has been modified

So I’m trying to add in the database certain items into a user stock, and I get this problem
For context I’m using .netcore web api, entityframework, identity and sql server on backend and reactjs in the frontend.

using EasyLink.Server.Database.DbModels;
using EasyLink.Server.Database.DbModels.User;
using EasyLink.Server.Identity;
using EasyLink.Server.Models.Categories.Stock;
using EasyLink.Server.Validations.CamelCaseConcat;
using Microsoft.AspNetCore.Identity;
using System.Security.Claims;

namespace EasyLink.Server.Services.Stock
{
    public class StockService : IStockService
    {
        private readonly UserManager<ApplicationUser> _userManager;

        public StockService(UserManager<ApplicationUser> userManager)
        {
            _userManager = userManager;

        }
    

        public async Task<bool> StockAddData(StockDataRequest request, ClaimsPrincipal User)
        {
            try
            {

                var userIdClaim = User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier);
                if (userIdClaim == null)
                {
                    Console.WriteLine("User ID claim not found.");
                    return false;
                }

                var userId = userIdClaim.Value;

                var currentUser = await _userManager.FindByNameAsync(userId);

                if (currentUser!.Stock == null)
                {
                    Console.WriteLine("Stock is null. Initializing stock.");
                    currentUser.Stock = new StockModel
                    {
                        ApplicationUserId = currentUser.Id,
                        AutoParts = new List<AutoPart>()
                    };
                }
                string fieldName = CamelCase.ConvertToCamelCase(request.Field!);
                if (request.Field == "Anvelope" && request.Data!.Categories!.ContainsKey(fieldName))
                {
                    var tyreDataJson = request.Data.Categories[fieldName]?.ToString();
                    if (string.IsNullOrEmpty(tyreDataJson))
                    {
                        Console.WriteLine("Tyre data is null or empty.");
                        return false;
                    }
                    var tyreData = CamelCase.DeserializeJsonCamel<AnvelopeModel>(tyreDataJson);

                    if (tyreData == null)
                    {
                        Console.WriteLine("Failed to deserialize tyre data.");
                        return false;
                    }


                    // Handle potential null values by providing defaults
                    var newAnvelope = new Anvelope
                    {
                        VehicleType = request.Data.Mandatory?.TipVehicul,
                        PartType = request.Data.Mandatory?.TipPiesa,
                        Delivery = request.Data.Mandatory?.Nou,
                        IsNew = request.Data.Mandatory?.Nou,
                        Price = request.Data.Mandatory?.Pret != null ? Convert.ToInt32(request.Data.Mandatory.Pret) : (int?)null,
                        Tva = request.Data.Mandatory?.Negociabil,
                        IsNegotiable = request.Data.Mandatory?.Negociabil,
                        Stock = currentUser.Stock,
                        TipDeAnvelope = Enum.TryParse<TyreType>(tyreData.TipDeAnvelope, out var tyreType) ? tyreType : TyreType.ToateSezoanele,
                        EmisieDeZgomot = tyreData.EmisieDeZgomot,
                        AderentaPeUmezeala = tyreData.AderentaPeUmezeala,
                        EficientaInCombustibil = tyreData.EficientaInCombustibil,
                        LatimeAnvelope = tyreData.LatimeAnvelope,
                        Producator = tyreData.Producator
                    };

                    currentUser.Stock!.AutoParts!.Add(newAnvelope);
                }
                else
                {
                    Console.WriteLine("Field is not 'Anvelope' or data is missing.");
                    return false;
                }

                // Save changes to the database
                Console.Write("nnnnnn1111nnnnn");//this writes 1111
                var updateResult = await _userManager.UpdateAsync(currentUser);
                if (!updateResult.Succeeded)
                {
                    Console.WriteLine($"Failed to update user: {string.Join(", ", updateResult.Errors.Select(e => e.Description))}");
                    return false;
                }

                return true;
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Exception occurred: {ex.Message} {ex.Source}");
                return false;
            }
        }




    }
}

this is from the client-side:

const sendForm = async () => {
    const formErrors = [];
    const formKeys = Object.keys(formData.mandatory);
    formKeys.forEach((e) => {
        if (formData.mandatory[e] === "") formErrors.push(e);
    });
    setError(formErrors);

    if (formErrors.length === 0) {
        const field = main.partType.data[currentCategoryIndex];
        try {
            console.log("sent");
            const response = await fetch('https://localhost:7128/api/stock/StockAddData', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                },
                credentials: 'include',
                body: JSON.stringify({
                    Data: formData,
                    Field: field
                })
            });

            if (response.ok) {
                console.log("RIGHT");
            } else {
                throw new Error('Failed to send data');
            }
        } catch (error) {
            console.error('Error sending data:', error);
        }
    }
};

I expected the service to return true, but it returns false and the error I mentioned.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật