Click here to Skip to main content
11,706,799 members (48,181 online)
Click here to Skip to main content
Add your own
alternative version

Signum Framework Tutorials Part 2 – Southwind Logic

, 15 Nov 2012 LGPL3 14.2K 931 21
In this part, we will focus on writing business logic, LINQ queries and explain inheritance
Northwind.zip
Northwind.bak
SignumFramework2.0-src.zip
signumframework-signumframework-c6436e1
.gitignore
Local.testsettings
README.md
Signum.Engine
ClassDiagram1.cd
Connection
DynamicQuery
Engine
Linq
ExpressionVisitor
Meta
Properties
Schema
Schema.cd
SchemaBuilder
SignumFramework.pfx
Signum.Entities
Attributes.cd
Basics
ClassDiagram1.cd
Diagram.cd
DynamicQuery
Tokens
Patterns
Properties
Reflection
Services
SignumFramework.pfx
Signum.Framework.vsmdi
Signum.Test
ClassDiagram1.cd
LinqProvider
Properties
Settings.settings
Signum.Utilities
DataStructures
IntervalDictionaries
ExpressionTrees
Properties
Reflection
SignumFramework.pfx
Synchronization
Signum.Web
ButtonBar
ControllerAttributes
Facades
HtmlHelpers
JSRenderer
LineHelpers
Lines
Mappings
PortableAreas
Repositories
Properties
Signum
Content
Controllers
Images
asc.gif
calendar.png
desc.gif
lineButtons.gif
sign_error.gif
Models
Scripts
Views
Widgets
SignumFramework.pfx
TypeContext
Widgets
Signum.Windows
Basics
Controls
ColorUtils
Converters
DynamicQuery
EntityControls
Facades
Fluent
Images
admin.png
alert.png
calendar.png
cancel.png
close.png
entity.png
find.png
forbidden.png
newColumn.png
newFilter.png
note.png
ok.png
pin.png
reload.png
save.png
star.png
Localization
MarkupExtensions
Properties
SignumFramework.pfx
Themes
Utilities
Widgets
SignumFrameworkSetup
SignumFrameworkSetup.vdproj
logo.ico
signumFramework2.0.jpg
Snippets
DroidSansMono.ttf
RazorSingleFileGenerator.vsix
Signum.Fonts.vssettings
T4template
entity.snippet
entityWithName.snippet
expressionMethod.snippet
expressionMethodQuery.snippet
expressionProperty.snippet
field.snippet
fieldCreacion.snippet
fieldEuro.snippet
fieldInicioFin.snippet
fieldString.snippet
fiff.snippet
propiedad.snippet
tran.snippet
Template
EntityControlTemplate
MyTemplate.vstemplate
SignumEntityControl.zip
__TemplateIcon.ico
Template
MyTemplate.vstemplate
ProjectName.Entities
MyTemplate.vstemplate
Properties
__TemplateIcon.ico
ProjectName.Load
MyTemplate.vstemplate
Properties
Settings.settings
__TemplateIcon.ico
ProjectName.Logic
MyTemplate.vstemplate
Properties
__TemplateIcon.ico
ProjectName.Web
Code
Content
smoothness
images
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
Controllers
Global.asax
MyTemplate.vstemplate
Properties
Settings.settings
Scripts
ServerCapri.svc
Views
Capri
Home
Shared
__TemplateIcon.ico
favicon.ico
ProjectName.Windows
Controls
MyTemplate.vstemplate
Properties
Settings.settings
__TemplateIcon.ico
SignumFramework2ClientServer.zip
__TemplateIcon.ico
WizardProjectName
Test
Properties
Settings.settings
WizardProjectName
Isolated
Properties
SignumFramework.pfx
TraceAndTestImpact.testsettings
SignumFramework2Setup.zip
SignumFramework2Setup.msi
Southwind-Part2-Logic.zip
.gitignore
README.md
Southwind.vssscc
Southwind
Southwind.Entities
Properties
Southwind.Load
Properties
Settings.settings
Southwind.Logic
Properties
Southwind.Web
Code
Content
smoothness
images
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
Controllers
Global.asax
Properties
Settings.settings
Scripts
ServerSouthwind.svc
Views
Home
Shared
Southwind
favicon.ico
Southwind.Windows
Controls
Properties
Settings.settings
Southwind.zip
Southwind.bak
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
    Microsoft ResX Schema 
    
    Version 2.0
    
    The primary goals of this format is to allow a simple XML format 
    that is mostly human readable. The generation and parsing of the 
    various data types are done through the TypeConverter classes 
    associated with the data types.
    
    Example:
    
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
                
    There are any number of "resheader" rows that contain simple 
    name/value pairs.
    
    Each data row contains a name, and value. The row also contains a 
    type or mimetype. Type corresponds to a .NET class that support 
    text/value conversion through the TypeConverter architecture. 
    Classes that don't support this are serialized and stored with the 
    mimetype set.
    
    The mimetype is used for serialized objects, and tells the 
    ResXResourceReader how to depersist the object. This is currently not 
    extensible. For a given mimetype the value must be set accordingly:
    
    Note - application/x-microsoft.net.object.binary.base64 is the format 
    that the ResXResourceWriter will generate, however the reader can 
    read any of the formats listed below.
    
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array 
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="TypeForTextArea0ShouldBeString" xml:space="preserve">
    <value>La propiedad Type del TextArea {0} debería ser string</value>
  </data>
  <data name="Server0DoesNotImplement1" xml:space="preserve">
    <value>El servidor {0} no implementa {1}</value>
  </data>
  <data name="AConnectionWithTheServerIsNecessaryToContinue" xml:space="preserve">
    <value>Es necesario tener conexión con el servidor para continuar</value>
  </data>
  <data name="SessionExpired" xml:space="preserve">
    <value>Sesión caducada</value>
  </data>
  <data name="EntitiesOfType0AreNotAllowed" xml:space="preserve">
    <value>Las entities de tipo {0} no estan permitidas</value>
  </data>
  <data name="EntitiesOfType0AreNotVisibleFromA0Window" xml:space="preserve">
    <value>Las entities de tipo {0}  nos son visibles desde una ventana {0}</value>
  </data>
  <data name="Call0First" xml:space="preserve">
    <value>Llama a {0} primero</value>
  </data>
  <data name="ViewNotDefinedInEntitySettings" xml:space="preserve">
    <value>View no definido en el EntitySettings</value>
  </data>
  <data name="AnEmbeddedEntityNeedsTypeContext" xml:space="preserve">
    <value>Una EmbeddedEntity necesita TypeContext</value>
  </data>
  <data name="ConvertingToTypeContext" xml:space="preserve">
    <value>Convirtiendo a TypeContext: </value>
  </data>
  <data name="CollapseIfNullHasToBeSetBeforeRoute" xml:space="preserve">
    <value>CollapseIfNull debe establecerse antes de Route</value>
  </data>
  <data name="ChooseAValue" xml:space="preserve">
    <value>Elige un valor</value>
  </data>
  <data name="PleaseChooseAValueToContinue" xml:space="preserve">
    <value>Por favor, elige un valor para continuar:</value>
  </data>
  <data name="RoutePropertyCanNotBeAppliedWithNullTypeContext" xml:space="preserve">
    <value>La propiedad Route no puede ser aplicada con un TypeContext nulo</value>
  </data>
  <data name="FinderOf0" xml:space="preserve">
    <value>Buscador de {0}</value>
  </data>
  <data name="ContextItsOnlyPossibleWithIdentifiableEntities" xml:space="preserve">
    <value>Context sólo es posible con IdentifiableEntities</value>
  </data>
  <data name="PleaseSelectAType" xml:space="preserve">
    <value>Por favor seleccione uno de los siguientes tipos:</value>
  </data>
  <data name="TypeSelector" xml:space="preserve">
    <value>Selector de tipo</value>
  </data>
  <data name="TypeArgumentMustInherit0" xml:space="preserve">
    <value>El argumento type debe heredar de {0}</value>
  </data>
  <data name="TypeForValueLineNotDetermined" xml:space="preserve">
    <value>ValueType para ValueLine con label {0} no determinado</value>
  </data>
  <data name="File" xml:space="preserve">
    <value>Archivo</value>
  </data>
  <data name="Note" xml:space="preserve">
    <value>Nota:</value>
  </data>
  <data name="NoDirectErrors" xml:space="preserve">
    <value>No hay errores directos</value>
  </data>
  <data name="_1Error" xml:space="preserve">
    <value>1 Error: {0}</value>
  </data>
  <data name="_0Errors1" xml:space="preserve">
    <value>{0} Errores: {1}</value>
  </data>
  <data name="NullValueNotAllowed" xml:space="preserve">
    <value>No se admite un valor nulo</value>
  </data>
  <data name="NoFilterSelected" xml:space="preserve">
    <value>Ha de seleccionar un filtro</value>
  </data>
  <data name="NoEntitySettingsForType0" xml:space="preserve">
    <value>No existe un EntitySetting para {0}</value>
  </data>
  <data name="NoAdminControlFor0" xml:space="preserve">
    <value>No existe un AdminControl para {0}</value>
  </data>
  <data name="Column" xml:space="preserve">
    <value>Columna</value>
  </data>
  <data name="CreateNew" xml:space="preserve">
    <value>Crear nueva</value>
  </data>
  <data name="Find" xml:space="preserve">
    <value>Buscar</value>
  </data>
  <data name="NewFilter" xml:space="preserve">
    <value>Nuevo filtro</value>
  </data>
  <data name="Operation" xml:space="preserve">
    <value>Operación</value>
  </data>
  <data name="Remove" xml:space="preserve">
    <value>Eliminar</value>
  </data>
  <data name="View" xml:space="preserve">
    <value>Ver</value>
  </data>
  <data name="ViewSelected" xml:space="preserve">
    <value>Ver seleccionada</value>
  </data>
  <data name="MoveDown" xml:space="preserve">
    <value>Mover abajo</value>
  </data>
  <data name="MoveUp" xml:space="preserve">
    <value>Mover arriba</value>
  </data>
  <data name="OpenFile" xml:space="preserve">
    <value>Abrir archivo</value>
  </data>
  <data name="SaveFile" xml:space="preserve">
    <value>Guardar archivo</value>
  </data>
  <data name="ViewFile" xml:space="preserve">
    <value>Ver archivo</value>
  </data>
  <data name="DragHorizontallyAndVertically" xml:space="preserve">
    <value>Arrastra horizontal o verticalmente</value>
  </data>
  <data name="ThereAreChangesContinue" xml:space="preserve">
    <value>Existen cambios no guardados y se perderán.

	¿Continuamos?</value>
  </data>
  <data name="ThereAreChanges" xml:space="preserve">
    <value>Hay cambios</value>
  </data>
  <data name="ImpossibleToSaveIntegrityCheckFailed" xml:space="preserve">
    <value>No se puede guardar porque existen errores de integridad:

</value>
  </data>
  <data name="ThereAreErrors" xml:space="preserve">
    <value>Hay errores</value>
  </data>
  <data name="SaveChanges" xml:space="preserve">
    <value>Si no guarda los últimos cambios se perderán.

	¿Guardar cambios?</value>
  </data>
  <data name="NoChanges" xml:space="preserve">
    <value>No hay cambios</value>
  </data>
  <data name="NoChangeHaveBeenFound" xml:space="preserve">
    <value>No se ha encontrado ningún cambio</value>
  </data>
  <data name="Administration0" xml:space="preserve">
    <value>Administración {0}</value>
  </data>
  <data name="Ok" xml:space="preserve">
    <value>Aceptar</value>
  </data>
  <data name="Cancel" xml:space="preserve">
    <value>Cancelar</value>
  </data>
  <data name="Close" xml:space="preserve">
    <value>Cerrar</value>
  </data>
  <data name="Save" xml:space="preserve">
    <value>Guardar</value>
  </data>
  <data name="Reload" xml:space="preserve">
    <value>Recargar</value>
  </data>
  <data name="Filters" xml:space="preserve">
    <value>Filtros</value>
  </data>
  <data name="Links" xml:space="preserve">
    <value>Links</value>
  </data>
  <data name="Notes" xml:space="preserve">
    <value>Notas</value>
  </data>
  <data name="NewNote" xml:space="preserve">
    <value>Nueva nota</value>
  </data>
  <data name="Type0IsNotAColection" xml:space="preserve">
    <value>El tipo {0} no es una colección</value>
  </data>
  <data name="Property0DoNotExistOnType1" xml:space="preserve">
    <value>La propiedad {0} no existe en el tipo {1}</value>
  </data>
  <data name="ParentWindowNotFound" xml:space="preserve">
    <value>No se ha encontrado la ventana padre</value>
  </data>
  <data name="Finder" xml:space="preserve">
    <value>Buscador</value>
  </data>
  <data name="NoNavigationDestinyForType" xml:space="preserve">
    <value>No se ha encontrado un destino de navegación para el tipo {0}</value>
  </data>
  <data name="ImposibleConvertObject0From1To2" xml:space="preserve">
    <value>Imposible convertir el objeto {0} de tipo {1} al tipo {2}</value>
  </data>
  <data name="Value" xml:space="preserve">
    <value>Valor</value>
  </data>
  <data name="Create" xml:space="preserve">
    <value>Crear</value>
  </data>
  <data name="InvalidFormat" xml:space="preserve">
    <value>Formato inválido</value>
  </data>
  <data name="InvalidDateFormat" xml:space="preserve">
    <value>Formato de fecha incorrecto</value>
  </data>
  <data name="Limitation" xml:space="preserve">
    <value>Límite:</value>
  </data>
  <data name="Results" xml:space="preserve">
    <value>Resultados.</value>
  </data>
  <data name="Field" xml:space="preserve">
    <value>Campo</value>
  </data>
  <data name="TypePropertyItsNotDeterminedForControl0" xml:space="preserve">
    <value>La propiedad Type no está establecida para el control con Label {0}</value>
  </data>
  <data name="Alert" xml:space="preserve">
    <value>Alerta</value>
  </data>
  <data name="NewAlert" xml:space="preserve">
    <value>Nueva alerta</value>
  </data>
  <data name="RelatedEntity" xml:space="preserve">
    <value>Entidad asociada</value>
  </data>
  <data name="Alerts" xml:space="preserve">
    <value>Alertas</value>
  </data>
  <data name="CheckedAlerts" xml:space="preserve">
    <value>Atendidas</value>
  </data>
  <data name="WarnedAlerts" xml:space="preserve">
    <value>No atendidas</value>
  </data>
  <data name="FutureAlerts" xml:space="preserve">
    <value>Futuras</value>
  </data>
  <data name="ThereIsNo0" xml:space="preserve">
    <value>No hay {0}</value>
  </data>
  <data name="New_m" xml:space="preserve">
    <value>Nuevo</value>
  </data>
  <data name="New_f" xml:space="preserve">
    <value>Nueva</value>
  </data>
  <data name="SelectAnElement" xml:space="preserve">
    <value>Seleccione un elemento</value>
  </data>
  <data name="RootTypeContextHasToBeAnIdentifiableEntity" xml:space="preserve">
    <value>El TypeContext raíz debe ser un IdentifiableEntity</value>
  </data>
  <data name="Query0NotAllowed" xml:space="preserve">
    <value>La query {0} no está permitida</value>
  </data>
  <data name="Query0NotRegistered" xml:space="preserve">
    <value>La query {0} no está registrada en el DynamicQueryManager</value>
  </data>
  <data name="_note" xml:space="preserve">
    <value>nota</value>
  </data>
  <data name="_notes" xml:space="preserve">
    <value>notas</value>
  </data>
  <data name="NewColumn" xml:space="preserve">
    <value>Nueva columna</value>
  </data>
  <data name="LoseChanges" xml:space="preserve">
    <value>Hay cambios que no se han guardado. 
¿Perder cambios?</value>
  </data>
  <data name="The0HasErrors1_f" xml:space="preserve">
    <value>La {0} tiene errores: 
{1}</value>
  </data>
  <data name="The0HasErrors1_m" xml:space="preserve">
    <value>El {0} tiene errores: 
{1}</value>
  </data>
  <data name="FixErrors" xml:space="preserve">
    <value>Corrige los errores</value>
  </data>
  <data name="ContinueWithErrors" xml:space="preserve">
    <value>Continuar con errores?</value>
  </data>
  <data name="ContinueAnyway" xml:space="preserve">
    <value>Continuar de todas formas?</value>
  </data>
  <data name="TheDataContextIsA0ButTypeContextIs1" xml:space="preserve">
    <value>El DataContext es un {0} pero el TypeContext es {1}</value>
  </data>
  <data name="Rename" xml:space="preserve">
    <value>Renombrar</value>
  </data>
  <data name="NewColumnSName" xml:space="preserve">
    <value>Nombre de la nueva columna</value>
  </data>
  <data name="ChooseTheDisplayNameOfTheNewColumn" xml:space="preserve">
    <value>Elige el nombre que se verá en la nueva columna </value>
  </data>
  <data name="Name" xml:space="preserve">
    <value>Nombre</value>
  </data>
  <data name="RestoreAll" xml:space="preserve">
    <value>Restaurar todas</value>
  </data>
</root>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)

Share

About the Author

Olmo del Corral
Software Developer (Senior) Signum Software
Spain Spain
I'm Computer Scientist, one of the founders of Signum Software, and the lead developer behind Signum Framework.

www.signumframework.com

I love programming in C#, Linq, Compilers, Algorithms, Functional Programming, Computer Graphics, Maths...

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150819.1 | Last Updated 15 Nov 2012
Article Copyright 2011 by Olmo del Corral
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid