NetDevelopersPoland / NetDevPLWebsite

MIT License
22 stars 24 forks source link

IRepository + IOC #83

Open lukasz-pyrzyk opened 7 years ago

lukasz-pyrzyk commented 7 years ago

I don't see any level of abstraction around database. This causes problems with unit testing...

I would like to introduce simple interface around Repository class and IoC container for automatic injecting.

What do you think?

pawelklimczyk commented 7 years ago

Good idea. How about trying that with one feature first? Facebook/users management/etc?

lukasz-pyrzyk commented 7 years ago

Sounds good for start. I will do it if you don't mind

pawelklimczyk commented 7 years ago

Sure! Just keep in mind this is running on Linux box mono --version Mono JIT compiler version 4.8.1 (Stable 4.8.1.0/22a39d7 Wed Apr 12 11:42:39 UTC 2017) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen

pawelklimczyk commented 7 years ago

If you want you can even incorporate CodeWatch stronger. What I mean is that e.g. each repository method returning list should return IEnumerable and method name should end with *List.

It just came to my mind.... so if you find it useful just add ;)