Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ORM for proper using of Dependency Injection #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Anisimova2020
Copy link


## Детальное проектирование

Ранее велись работы в этом направлении, которые учитываются при написании данной постановки:
Copy link
Member

@kuzkok kuzkok Mar 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ещё вот такое было #16

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Спасибо, дополню.


Сейчас существует ряд особенностей ORM и ODataService, которые не позволяют использовать DI в "классическом виде".
1. Обращение к UnityFactory происходит в произвольном методе произвольного класса.
2. Аналогично происходит работа некоторых статических классов, которые фактически являются реализацией внедрения зависимостей (например, [DataServiceProvider.DataService](https://github.com/Flexberry/NewPlatform.Flexberry.ORM/blob/3ec3dc517469e6df519035d750a3da6c44a91bac/ICSSoft.STORMNET.Business/DataServiceProvider.cs#L28)).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пожалуй, самым проблемным является AuditService.Current

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants