I have my repository, with method of adding
public virtual T Adiciona(T entity)
{
_dbSet.Add(entity);
return entity;
}
Not if it is possible,
All my classes inherit from "ModelBase"
public class ModelBase
{
[Key]
public int Id { get; set; }
public int EmpresaId { get; set; }
}
This companyId is a user property, which is the company that it is linked to
I want to write all my models that inherit from modelbase, I want to pass the company id already
Any ideas how to do this?