1 Replies - 624 Views - Last Post: 28 June 2016 - 07:32 AM

#1 mrapi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 27-November 13

Controller that combine 2 or more entities

Posted 24 April 2016 - 01:48 AM

Hi,what is the best practice to create a controller that get data from 2 or more entities,let say I have Operators,Sales,SalesDetails,Products

I need to get operators and current opened sales count, sale details for current operator (products name,etc)

I'm asking this because there is just one model class I can select when I create Web API Controller (with EF )

I'm also looking for a god WEB API tutorial from 0 to advanced.

thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Controller that combine 2 or more entities

#2 IngeniousHax  Icon User is offline

  • |>|20-514<|{3|2

Reputation: 84
  • View blog
  • Posts: 1,385
  • Joined: 28-March 09

Re: Controller that combine 2 or more entities

Posted 28 June 2016 - 07:32 AM

Do you have a relational data model or each table independent? For example, Does Operators have a 1-* relationship with Sales?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1