After starting my application for the first time, my application is taking 7 seconds to insert just a single entity with 2 attributes.
I am using .NET Framework in a desktop application, Visual Studio 2019 Community edition, Entity Framework v6.0.0.0.
Am I making some mistake? Does any one have any idea?
This is my code:
UserService UserService = new UserService();
User userObj = new User();
userObj.Name = "Arsi";
userObj.Age = 25;
// db.Users.Add(userObj);
// db.SaveChanges();
UserService.InsertUser(userObj);
CRUD_TestingEntities db = new CRUD_TestingEntities();
public void InsertUser(User user)
{
if (user != null)
{
db.Users.Add(user);
db.SaveChanges();
}
}