我需要在 c# 中作为异步多次执行一个方法

I need to execute one method multiple time as async in c#

我需要使用等待运算符在 c# 中作为异步多次执行一个方法。以下是我的代码

Task.Factory.StartNew(() => SentSMS(null, creation.SenderMobile, messageToSender));
Task.Factory.StartNew(() => SentSMS(null, creation.ReceiverMobile, messageToReciver));
Task.Factory.StartNew(() => SentSMS(null, empMobile, messageToEmp));
private async Task SentSMS(SMSReceived smsrecived, string mobilenumber ,string message)
{
    try
    {
        sent = new SMSSent();
        sent.MobileNumber = Util.ParseMobileNo(mobilenumber);
        sent.MobileOperator = Util.GetMobileOperator(mobilenumber);
        sent.QueryCodeId = 1;
        sent.ReplyByTelcoID = 1;
        sent.ReplyText = message;
        sent.ReplyByTelcoID = 1;
        sent.SMSReceivedId = (smsrecived == null ? 0 : smsrecived.ID);
        sent.SMSSentDate = DateTime.Now;
        sent.Status = 1;
        sentBL.Save(sent);
    }
    catch (Exception)
    {

    }
}

问题是,当最后一个请求开始时,它会覆盖其余的 2 条记录。执行此代码后,我检查了数据库,它保存了 one/same 记录 3 次。

不要告诉我我正在传递相同的数据三次。所有的值都是不同的。 我需要帮助。让我知道我是否缺少某些地方。我也试过 Task.Run()。我不想使用 await 。在 await 中,结果也是一样的

已附数据库截图

do not tell me i am passing same data thrice. All the values are different.

但不是,因为sent是一个字段,正在被覆盖,然后所有的值都一样。

使 sent 成为在方法内部创建的本地。