Posts by IPValverde • 341 points
4 posts
-
2
votes1
answer190
viewsA: Access a Singleton Repository outside the Controller (Dependency Injection)
I believe you’re confusing the two ways and injecting dependencies. Parameter in the constructor As you yourself mentioned, placing a parameter in the constructor is the silver receive an instance…
-
0
votes4
answers298
viewsA: How to implement an Objectset wrapper that works with Linqtoentities?
For those who have the same problem as me, I got the answer I was looking for in stackoverflow.com by Denis Itskovich:…
-
17
votes5
answers2480
viewsA: Check if day exists in month
You can find out what the last day of the month 'x': public bool IsDiaValido(int dia, int mes, int ano) { int ultimoDiaMes = DateTime.DaysInMonth(ano, mes); if(dia > ultimoDiaMes || dia < 1)…
-
7
votes4
answers298
viewsQ: How to implement an Objectset wrapper that works with Linqtoentities?
I need to create a wrapper for ObjectSet to create a centralized access control. The goal is to implement CA without making changes to existing queries in the system, which in this case are spread…