0
omital created
Hi, first of all I create new NameValue in claims that initial in login method, after that I declare a data filter that called "bookId". for now I set "bookId" manually in each application service's methods for example:
CurrentUnitOfWork.SetFilterParameter("BookFilter", "bookId", _sessionAppService.CurrentBookId());
How can set bookId in entire project like tenantId data filter?
2 Answer(s)
-
0
Override Initialize method in your dbcontext and set it like we do: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.EntityFramework/EntityFramework/AbpDbContext.cs#L165">https://github.com/aspnetboilerplate/as ... xt.cs#L165</a> (remember to call base.Initialize first.)
-
0
Awesome framework based on .net. ;) :)