Mercurial > altnet-hispano
annotate Agendas/trunk/src/Agendas.Web/Global.asax.cs @ 291:5f1e3d35e113
Patrocinadores: Correcciones en Vistas.
author | juanjose.montesdeocaarbos |
---|---|
date | Thu, 09 Feb 2012 00:12:00 -0300 |
parents | bf993f99cee3 |
children |
rev | line source |
---|---|
275
bf993f99cee3
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
179
diff
changeset
|
1 using System.Web; |
bf993f99cee3
Ticket #123: Patrocinadores de las vans.
juanjose.montesdeocaarbos
parents:
179
diff
changeset
|
2 using System.Web.Mvc; |
10 | 3 using System.Web.Routing; |
50
3ebe89c88caa
Agregando propiedad al Evento sobre el Usuario que lo crea o que realizó la
nelopauselli
parents:
34
diff
changeset
|
4 using AltNetHispano.Agendas.Domain; |
34
475be11edf56
Ajuste en los nombre de los assemblies y namespaces
nelo@MTEySS.neluz.int
parents:
19
diff
changeset
|
5 using AltNetHispano.Agendas.Factories; |
83
7e9ffde4022d
Implementando DataAnnotation desde recursos y por convención
nelopauselli
parents:
67
diff
changeset
|
6 using AltNetHispano.Agendas.Resources.Properties; |
84 | 7 using AltNetHispano.Agendas.Web.CustomModelMetadataProvider; |
10 | 8 |
34
475be11edf56
Ajuste en los nombre de los assemblies y namespaces
nelo@MTEySS.neluz.int
parents:
19
diff
changeset
|
9 namespace AltNetHispano.Agendas.Web |
10 | 10 { |
11 // Note: For instructions on enabling IIS6 or IIS7 classic mode, | |
12 // visit http://go.microsoft.com/?LinkId=9394801 | |
13 | |
14 public class MvcApplication : System.Web.HttpApplication | |
15 { | |
84 | 16 private static void RegisterGlobalFilters(GlobalFilterCollection filters) |
10 | 17 { |
18 filters.Add(new HandleErrorAttribute()); | |
179 | 19 filters.Add(NHibernateFactory.GetNHibernateSessionPerAction()); |
10 | 20 } |
21 | |
84 | 22 private static void RegisterRoutes(RouteCollection routes) |
10 | 23 { |
24 routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); | |
25 | |
26 routes.MapRoute( | |
27 "Default", // Route name | |
28 "{controller}/{action}/{id}", // URL with parameters | |
29 new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults | |
30 ); | |
31 | |
32 } | |
33 | |
34 protected void Application_Start() | |
35 { | |
84 | 36 ModelMetadataProviders.Current = |
85 | 37 new DataAnnotationAndConventionModelMetadataProvider( |
84 | 38 new ResolverThroughResource<DataAnnotationResources>()); |
83
7e9ffde4022d
Implementando DataAnnotation desde recursos y por convención
nelopauselli
parents:
67
diff
changeset
|
39 |
10 | 40 AreaRegistration.RegisterAllAreas(); |
41 | |
42 RegisterGlobalFilters(GlobalFilters.Filters); | |
43 RegisterRoutes(RouteTable.Routes); | |
19 | 44 |
94
db4b1e2cae49
Cambio del nombre de la clase Ponente a Persona
Nelo@Kenia.neluz.int
parents:
85
diff
changeset
|
45 IdentityContext.Init(new HttpContextIdentityProvider(), AgendaFactory.GetPersonaRepository()); |
10 | 46 } |
47 } | |
48 } |