What a POCO (Plain Old CLR Object) does it that it allows you to create your own representation class of your database. Entity Framework then converts your database (through a configuration (hint use an edmx file)) to the by you created POCO classes.
Example:
Table User:
id | fName | lName | otherField
You can represent this in your C# with a POCO to a user object with the following properties:
int id, string fName, string lName, var otherField.
Then you can, in the getters and setters of these properties, insert your business logic.
NOTE: I'd recommend using just the Entity Framework icm with an edmx file. And put your business logic somewhere else. When creating a web service I always like the following order of classes :
- A class that receives the calls and calls the right functions of the next class
- This class then converts the given params in the call into a format that the rest of the application understands and calls the right functions of another class.
- This class then checks the business logic in the params and calls another class to do something with the database.
- This class then handles the database connection and stuff (with use of the Entity Framework) Note again: you can also use POCO's in this last step ;)