I have my application, which shares the same database with all my clients.
By separating them only by a column of the Empresa_Id
table, all my actions, Save, List, Edit, Delete are done by my repository.
In my repository I pass the business ID, always before executing the action. But in my Edit, as it sends the Id through the URL to return to View, I can not handle this, and others can access the data of others.
So what's flawed is this method of the repository here:
public virtual T getById(int id)
{
return _dbSet.Find(id);
}
Any ideas to get around this problem?
I've even thought about changing my PK all to GUID, but I'm afraid my queries will be very slow (since the Entity Framework is famous for being a slow ORM compared to others).