locked
Does WebAPI handle EF objects? RRS feed

  • Question

  • User-900017823 posted

    We're trying to move some of our processes and services to Azure. I've been using WebAPI for the middle-tier and using POCO classes to pass data back and forth. However, my colleagues would rather use Entity Framework, which makes sense. They've asked me if WebAPI services can work with EF objects, sending data and receiving results. I'm not so sure, so I'm asking here. Can WebAPI pass EF objects in method parameters and return them?

    Friday, August 17, 2018 3:51 PM

Answers

  • User-821857111 posted

    Yes. You can use any data access technology within a Web API application. EF is the recommended approach. The objects that EF works with generally tend to be POCO classes.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 17, 2018 3:58 PM

All replies

  • User-821857111 posted

    Yes. You can use any data access technology within a Web API application. EF is the recommended approach. The objects that EF works with generally tend to be POCO classes.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 17, 2018 3:58 PM
  • User-900017823 posted

    OK, thank you!

    Friday, August 17, 2018 4:04 PM