Paged result and filtering2019 Community Moderator Electionbest layer for placing dependency injection related code in layered proejectOpinion on ASP.NET MVC Onion-based architectureShould we expose IDataContext in an Onion architectureShould the login logic be removed from the controllerServices and Authorization in Onion ArchitecturePlacement of view models/DTOs in onion architectureOnion Framework: Should UI/Controllers have directly access to repositoryin which layer should i implement viewmodel to domain model mapping in Onion architecture?How to check Business logic in Onion Architecture Domain Layer?Onion Architecture - Choosing the right “module” approach

Format picture and text with TikZ and minipage

Confusion with the nameplate of an induction motor

Force user to remove USB token

Prove that the total distance is minimised (when travelling across the longest path)

Word for a person who has no opinion about whether god exists

Single word request: Harming the benefactor

Is it true that real estate prices mainly go up?

How does Dispel Magic work against Stoneskin?

If the Captain's screens are out, does he switch seats with the co-pilot?

What to do when during a meeting client people start to fight (even physically) with each others?

What is the dot in “1.2.4."

Deleting missing values from a dataset

When two POV characters meet

Humans have energy, but not water. What happens?

Are there situations where a child is permitted to refer to their parent by their first name?

Giving Plot options defined outside of the Plot expression

Touchscreen-controlled dentist office snowman collector game

Provisioning profile doesn't include the application-identifier and keychain-access-groups entitlements

Do I need to leave some extra space available on the disk which my database log files reside, for log backup operations to successfully occur?

Replacing Windows 7 security updates with anti-virus?

Is having access to past exams cheating and, if yes, could it be proven just by a good grade?

What is the blue range indicating on this manifold pressure gauge?

"One can do his homework in the library"

Am I not good enough for you?



Paged result and filtering



2019 Community Moderator Electionbest layer for placing dependency injection related code in layered proejectOpinion on ASP.NET MVC Onion-based architectureShould we expose IDataContext in an Onion architectureShould the login logic be removed from the controllerServices and Authorization in Onion ArchitecturePlacement of view models/DTOs in onion architectureOnion Framework: Should UI/Controllers have directly access to repositoryin which layer should i implement viewmodel to domain model mapping in Onion architecture?How to check Business logic in Onion Architecture Domain Layer?Onion Architecture - Choosing the right “module” approach










0















I'm implementing onion architecture for the first time, and my project basically follows the structure below:



  • DOMAIN

MyApp.Domain.Entities (DLL)



PagedResult.cs



ProductByProducerFilter.cs



Product.cs



MyApp.Domain.Interfaces (DLL)



public interface IProductRepository 

PagedResult<Product> GetProductsByProducer(ProductByProducerFilter Filter);




  • SERVICE INTERFACES

MyApp.Services.Interfaces (DLL)



public interface IProductService 

PagedResult<Product> GetProducts(ProductByProducerFilter Filter);





  • SERVICE



    public class ProductService: IProductService

    private readonly IProductRepository _Product = null;

    public ProductService(IProductRepository Product)

    this._Product = Product;



    public PagedResult<Product>GetProducts(ProductByProducerFilter Filter)
    return this._Product.GetProductsByProducer(Filter);


  • USER INTERFACE


MyApp.UI (DLL)



My User interface will use ProductService and show the content to the user



Basically I have the classes PagedResult and ProductByProducerFilter that are located in my Domain Entities, but the entities in my domain are business objects and not classes responsible for paging and filtering.



Create other DLL to keep the classes ProductByProducerFilter and PagedResult in my Domain in a way that all other layers can reference it is the best solution? How Can I deal properly with this type of situation?










share|improve this question




























    0















    I'm implementing onion architecture for the first time, and my project basically follows the structure below:



    • DOMAIN

    MyApp.Domain.Entities (DLL)



    PagedResult.cs



    ProductByProducerFilter.cs



    Product.cs



    MyApp.Domain.Interfaces (DLL)



    public interface IProductRepository 

    PagedResult<Product> GetProductsByProducer(ProductByProducerFilter Filter);




    • SERVICE INTERFACES

    MyApp.Services.Interfaces (DLL)



    public interface IProductService 

    PagedResult<Product> GetProducts(ProductByProducerFilter Filter);





    • SERVICE



      public class ProductService: IProductService

      private readonly IProductRepository _Product = null;

      public ProductService(IProductRepository Product)

      this._Product = Product;



      public PagedResult<Product>GetProducts(ProductByProducerFilter Filter)
      return this._Product.GetProductsByProducer(Filter);


    • USER INTERFACE


    MyApp.UI (DLL)



    My User interface will use ProductService and show the content to the user



    Basically I have the classes PagedResult and ProductByProducerFilter that are located in my Domain Entities, but the entities in my domain are business objects and not classes responsible for paging and filtering.



    Create other DLL to keep the classes ProductByProducerFilter and PagedResult in my Domain in a way that all other layers can reference it is the best solution? How Can I deal properly with this type of situation?










    share|improve this question


























      0












      0








      0








      I'm implementing onion architecture for the first time, and my project basically follows the structure below:



      • DOMAIN

      MyApp.Domain.Entities (DLL)



      PagedResult.cs



      ProductByProducerFilter.cs



      Product.cs



      MyApp.Domain.Interfaces (DLL)



      public interface IProductRepository 

      PagedResult<Product> GetProductsByProducer(ProductByProducerFilter Filter);




      • SERVICE INTERFACES

      MyApp.Services.Interfaces (DLL)



      public interface IProductService 

      PagedResult<Product> GetProducts(ProductByProducerFilter Filter);





      • SERVICE



        public class ProductService: IProductService

        private readonly IProductRepository _Product = null;

        public ProductService(IProductRepository Product)

        this._Product = Product;



        public PagedResult<Product>GetProducts(ProductByProducerFilter Filter)
        return this._Product.GetProductsByProducer(Filter);


      • USER INTERFACE


      MyApp.UI (DLL)



      My User interface will use ProductService and show the content to the user



      Basically I have the classes PagedResult and ProductByProducerFilter that are located in my Domain Entities, but the entities in my domain are business objects and not classes responsible for paging and filtering.



      Create other DLL to keep the classes ProductByProducerFilter and PagedResult in my Domain in a way that all other layers can reference it is the best solution? How Can I deal properly with this type of situation?










      share|improve this question
















      I'm implementing onion architecture for the first time, and my project basically follows the structure below:



      • DOMAIN

      MyApp.Domain.Entities (DLL)



      PagedResult.cs



      ProductByProducerFilter.cs



      Product.cs



      MyApp.Domain.Interfaces (DLL)



      public interface IProductRepository 

      PagedResult<Product> GetProductsByProducer(ProductByProducerFilter Filter);




      • SERVICE INTERFACES

      MyApp.Services.Interfaces (DLL)



      public interface IProductService 

      PagedResult<Product> GetProducts(ProductByProducerFilter Filter);





      • SERVICE



        public class ProductService: IProductService

        private readonly IProductRepository _Product = null;

        public ProductService(IProductRepository Product)

        this._Product = Product;



        public PagedResult<Product>GetProducts(ProductByProducerFilter Filter)
        return this._Product.GetProductsByProducer(Filter);


      • USER INTERFACE


      MyApp.UI (DLL)



      My User interface will use ProductService and show the content to the user



      Basically I have the classes PagedResult and ProductByProducerFilter that are located in my Domain Entities, but the entities in my domain are business objects and not classes responsible for paging and filtering.



      Create other DLL to keep the classes ProductByProducerFilter and PagedResult in my Domain in a way that all other layers can reference it is the best solution? How Can I deal properly with this type of situation?







      c# onion-architecture






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 7 at 5:31









      Uwe Keim

      27.6k32132214




      27.6k32132214










      asked Mar 6 at 17:37









      Harry AxlHarry Axl

      62




      62






















          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55029108%2fpaged-result-and-filtering%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55029108%2fpaged-result-and-filtering%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

          Алба-Юлія

          Захаров Федір Захарович