One thing to be aware of. You're doing a case sensitive comparison of a string there. What happens if the case doesn't match what you're testing for (hint, you won't trigger any of your enable conditions)?
i have a problem for making rfid program with socket in c#.
i try this code :
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
IPAddress ip = Dns.GetHostAddresses(ipLoc);
IPEndPoint ep = new IPEndPoint(ip,23);
We are now in the planning stage of the next web based project using C#, MVC 5 and Entity framework 6. We are discussing about framing the project using the Repository pattern. We already have the full database ready. So, it is going to be Database first.
Now, my question : Is it feasible / worth using Repository pattern with database first approach? I got this doubt because, many sources and examples found in internet are Code first approach. If it is possible can you please provide me any advice or online/article sources to refer. Thanks.
I welcome any ideas or suggestions on Repository pattern.
As Pete O'Hanlon said, you can. We use the Repository pattern + Unit of Work on the project I'm on right now. While we do use Code First, there is no reason it can't apply to Database First as well. Someone can correct me if I'm wrong, but I don't think the purpose of the Repository pattern was designed specifically for Code First. One advantage of using Repo is testing, another is dependency injection. It's simple to test using a Repository, from what I can tell here.