Factory | Repository | |
1 | The factory pattern deals with how an object is created | The repository pattern deals with creating a set of data access services, It is CRUD methods |
2 | Factory Model having very limited data | Repository Model having all data |
3 | For saving model, never recommended Factory | For saving model, always recommended Repository |
4 | If creating Objects and fill those objects with data need to use a Factory | If creating objects and fill those objects with database data need to use a Repository |