Month: November 2008
Workaround a la navegación entre relaciones en Dynamic Data
Si se te presenta el error A property with name ‘Entidad.Campo’ does not exist in metadata for entity type ‘WebAppDataEntitiesA.EntidadDestino’.
Es muy probable que lo puedas resolver con este workaround disponible en Codeplex.
http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=16367
Para mis lectores que desean saber la implementación en español aquí les va.
Dynamic Data Entity Web Application
1. Botón derecho sobre la aplicación web y seleccionen “Agregar Referencia”, Seleccionan Browse y seleccionan Microsoft.Web.DynamicData.dll del archivo zip que descargaron de CodePlex.
2. Cuando registran su Entity Framework Model en el Global.asax realicen el siguiente cambio:
En lugar de esto:
model.RegisterContext(typeof(YourDataContextType), new ContextConfiguration() { ScaffoldAllTables = false });
Usen esto:
C#
model.RegisterContext(new Microsoft.Web.DynamicData.EFDataModelProvider(typeof(YourDataContext)), new ContextConfiguration() { ScaffoldAllTables = false });
VB
model.RegisterContext(New Microsoft.Web.DynamicData.EFDataModelProvider(GetType(YourDataContext)), New ContextConfiguration() With { .ScaffoldAllTables = False })
Noten que la diferencia es reemplazar typeof(YourDataContextType) con new Microsoft.Web.DynamicData.EFDataModelProvider(typeof(YourDataContext)).
3. Abran el DynamicData\FieldTemplates\ForeignKey.ascx. Y remplacen el método GetDisplayString con este método:
C#
protected string GetDisplayString() {
try {
return FormatFieldValue(ForeignKeyColumn.ParentTable.GetDisplayString(FieldValue));
} catch (Exception) {
return ForeignKeyColumn.ParentTable.DisplayName;
}
}
VB
Protected Function GetDisplayString() As String
Try
Return FormatFieldValue(ForeignKeyColumn.ParentTable.GetDisplayString(FieldValue))
Catch ex As Exception
Return ForeignKeyColumn.ParentTable.DisplayName
End Try
End Function
Saludos y espero les sirva.
Investigación Domain Driven Design
Estimados amigos les comparto las ligas que he encontrado al respecto de un tema que me encanta.
Espero les sirva para ampliar sus investigaciones sobre el tema.
Saludos
Domian Driven Design
http://domaindrivendesign.org/
AUTORES BLOGS
Jimmy Nilsson
http://jimmynilsson.com/blog/
TEMAS
POCO – Plain Old CLR Object
http://en.wikipedia.org/wiki/Plain_Old_CLR_Object
UbicuitousLanguage
http://domaindrivendesign.org/discussion/messageboardarchive/UbiquitousLanguage.html
http://steve.emxsoftware.com/Domain+Driven+Design/DDD+Ubiqitous+Language
Agile Terminology
http://www.haywood-associates.co.uk/agile-terminology.jsp
E-book
Domain Driven Design Quickly
http://www.infoq.com/minibooks/domain-driven-design-quickly
Referencias en español
Arquitectura de capas
http://msmvps.com/blogs/lopez/archive/2008/09/13/arquitectura-de-capas-en-domain-driven-design.aspx
Enlaces y Recursos Domain-Driven Design
http://msmvps.com/blogs/lopez/archive/2006/12/09/enlaces-y-recursos-domain-driven-design.aspx
Libros
Domain-driven Design: Tackling Complexity in the Heart of Software
http://books.google.com.mx/books?id=7dlaMs0SECsC&printsec;=frontcover&dq;=domain+driven+design
Applying Domain-Driven Design and Patterns: With Examples in C# and .NET
http://books.google.com.mx/books?id=wKhQAAAAMAAJ&q;=domain+driven+design&dq;=domain+driven+design
VIDEOS
http://www.domaindrivendesign.org/events/oopsla2007/bof/EricEvansQuote.html
DDD: putting the model to work
http://www.infoq.com/presentations/model-to-work-evans
Eric Evans on DDD: Strategic Design
http://www.infoq.com/presentations/strategic-design-evans
Jimmy Nilsson on Domain Driven Design
http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design
http://www.domaindrivendesign.org/events/oopsla2007/bof/MartinFowlerQuote.html
http://www.domaindrivendesign.org/events/oopsla2007/bof/DanNorthQuote.html
AUDIOS
Eric Evans on Domain Driven Design
http://www.dotnetrocks.com/default.aspx?showNum=236
Jimmy Nilsson on Domain Driven Design
http://www.dotnetrocks.com/default.aspx?showNum=191
EJEMPLOS
http://dddsample.sourceforge.net/
http://timeandmoney.domainlanguage.com/