use Identity value in entity after insert in Database i want to generate value using current date and ID of inserted entity
problem is that ID value not generated until insert object to  database,
so i use this code for generate value:  

public ActionResult Create([Bind(Include = "ID,TrackingCode,FirstName,LastName,ProductName,CurrentStats,FailureReason,ReceiveDateTime,DeliveryDateTime,Price,Description,SerialNumber,ExtraItems,PhoneNumber")] Tracking tracking)
    {
        if (ModelState.IsValid)
        {
            db.Trackings.Add(tracking);
            db.SaveChanges();
            Tracking _tracking = db.Trackings.Find(tracking.ID);
            db.Entry(_tracking).State = EntityState.Modified;
            _tracking.TrackingCode = Convert.ToInt32(DateTime.Now.ToString("yyyyMMdd") + tracking.ID.ToString());
            db.SaveChanges();
            return RedirectToAction("Index");
        }

        return View(tracking);
    }  


code work fine and do job that i want
but i think this is not standard way is there any better approach to improve this code?
I would suggest you change your database design. 

Option 1)

Have SQL Server set a column to the current date/time when you insert a row  See https://stackoverflow.com/q/6594589 for how to do it.  Then have that column mapped on your Tracking entity but mark the property as [DatabaseGenerated(DatabaseGeneratedOption.Computed)]  

Assuming you call the field AddDate

[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public datetime AddDate {get;set;}


Now you can create your get only TrackingCode property in code and use the [NotMapped] on it and define it as 

[NotMapped]
public int TrackingCode 
{
     get { return Convert.ToInt32(AddDate.ToString("yyyyMMdd") + tracking;
}


Option 2:

Create an after insert tigger and have SQL Server update the TrackingCode.  Again I would mark the property as DatabaseGenerated

In a nut shell it's better to offload this to the SQL Server