A. Bekiaris's Blog
Παρουσίαση με Ετικέτες
Όλες οι Ετικέτε...
»
Xpo
»
Devexpress
(RSS)
AOP
Design Patterns
Validation
Xaf
Xaf Tips
Xaf tip # 6 Linq your Session queries
17 Σεπτεμβρίου 09 04:07 μμ
|
tolisss
|
0 σχόλια
Pretty silent these days eh? I am working on a big refactoring on DictionaryDifference and have not much time to blog. But have another tip for my Xaf Tips series today maybe not strictly Xaf but is an XPO tip that you can use with your Xaf applications . The Problem Suppose your are a strongly typed fun like me or you want to use linq to query objects inside a transaction. In order linq to be used with XPO DevExpress provides XPQuery<T> class but unfortunately this do not support transactions. So the following test fails var work = new UnitOfWork(); new User(work){UserName = "Sam" }; User firstOrDefault = new XPQuery<User>(work).Where(user => user.UserName == "Sam" ).FirstOrDefault(); Assert.IsNotNull(firstOrDefault); The solution
Διαβάστε περισσότερα »
Validation Rule: At least one property is required
03 Ιουνίου 09 01:33 πμ
|
tolisss
|
0 σχόλια
Today i stump again upon the same problem . I wanted to throw a validation exception only if both of my properties do not have value. So lets create a validation rule for this one. More info on how we create custom validation rules can be found here Validation Module Since we are talking about multiple property values i think we should go with an attribute that is applied to a class and not to a property. Ok first we have to define that both our RuleBaseAttribute and RuleBaseProperties derived classes will implement . public interface IRuleRequiredForAtLeast1PropertyProperties { string MessageTemplateMustNotBeEmpty { get; set; } string Delimiters { get; set; } string TargetProperties { get; set; } } ok that looks nice lets explain what we have here for a bit.
Διαβάστε περισσότερα »
Automatic properties for Xpo
02 Ιουνίου 09 05:23 πμ
|
tolisss
|
0 σχόλια
The problem Xpo in order to support transactions implements some special kind of property setters like private string lastName; public string LastName { get { return lastName; } set { string oldValue = lastName; if (oldValue == value) return; lastName = value; OnChanged("Name", oldValue, value); } } Or a little more elegant like private string lastName; public string LastName { get { return lastName; } set { SetPropertyValue("LastName", ref lastName, value); } } Imagine you want to Design a fairly simple model like Customer –> Orders. A Customer should have LastName, FilrstName, Age and Orders as properties and Order only an Amount property. Using the above approach one could write the following code to describe the above model.
Διαβάστε περισσότερα »
Search
Go
Το Ιστολόγιο
Αρχική Σελίδα
Ετικέτες
13.2
ace.c9
AdditionalViewControlsProvider
anonymouslogin
AOP
application framework
aspect-oriented programming
AspxTreeListEditor
AuditTrail
BaseImpl
BDD
Blogging
breaking changes
C#
Code Generation
Code Quality
CodeDom
CodeRush
CodeSmith
Continous Integration
Cookies
Core.Web
Core.Win
CQL
CThru
dashboard
DataStoreAttribute
DBMapper
Design Patterns
Devexpress
DictionaryDifferenceStore
DomainComponents
DSL
DX
DxCore
Dynamic Types
EasyTest
Email
Entity Framework
events
ExcelImporter
eXpand
FormsAuthentication
IO
Logic
MemberlevelSecurity
Merging
ModelArtifactState
ModelDifference
Montly_News
MSpec
navigation
NBehave
NCaousel
NCover
NDepend
open source
performance
PivotChart
PostSharp
propertypathfilter
ProvidedAssociation
refactor
RememberMe
reports
Resharper
runtime members
Scheduler
Scripting
Security
source code
SqlDbMapper
statemachine
SubVersion
survey
TDD
Templating
TestDriven
Thumbnails
ToolTips
TortoiseSVN
training
TreeListEditors
TypeMock
v10
Validation
video
view inheritance
ViewController
ViewVariants
Visual Studio plugins
WCF
WebSitePark
WF
WorldCreator
WorldCreator2
Xaf
Xaf Tips
Xpo
XVideoRental
Πλοήγηση
Αρχική σελίδα
Ιστολόγια
Συζητήσεις
Εκθέσεις Φωτογραφιών
Αρχειοθήκες
Ιστορικό Δημοσιεύσεων
Ιανουάριος 2019 (1)
Οκτώβριος 2018 (1)
Αύγουστος 2018 (1)
Ιούνιος 2018 (1)
Μάρτιος 2018 (1)
Αύγουστος 2017 (2)
Απρίλιος 2016 (1)
Ιούλιος 2014 (1)
Ιούνιος 2014 (1)
Απρίλιος 2014 (1)
Δεκέμβριος 2013 (1)
Νοέμβριος 2013 (7)
Οκτώβριος 2013 (6)
Σεπτέμβριος 2013 (4)
Αύγουστος 2013 (4)
Ιούλιος 2013 (7)
Μάιος 2013 (2)
Απρίλιος 2013 (2)
Μάρτιος 2013 (1)
Φεβρουάριος 2013 (2)
Ιανουάριος 2013 (5)
Δεκέμβριος 2012 (3)
Νοέμβριος 2012 (3)
Σεπτέμβριος 2012 (1)
Αύγουστος 2012 (2)
Μάιος 2012 (1)
Απρίλιος 2012 (1)
Μάρτιος 2012 (2)
Ιανουάριος 2012 (2)
Δεκέμβριος 2011 (4)
Νοέμβριος 2011 (1)
Σεπτέμβριος 2011 (5)
Αύγουστος 2011 (5)
Ιούνιος 2011 (1)
Απρίλιος 2011 (2)
Μάρτιος 2011 (1)
Φεβρουάριος 2011 (2)
Ιανουάριος 2011 (2)
Δεκέμβριος 2010 (3)
Νοέμβριος 2010 (3)
Οκτώβριος 2010 (3)
Σεπτέμβριος 2010 (8)
Αύγουστος 2010 (6)
Ιούλιος 2010 (1)
Μάιος 2010 (3)
Απρίλιος 2010 (5)
Μάρτιος 2010 (9)
Φεβρουάριος 2010 (5)
Ιανουάριος 2010 (3)
Δεκέμβριος 2009 (3)
Νοέμβριος 2009 (8)
Οκτώβριος 2009 (11)
Σεπτέμβριος 2009 (8)
Αύγουστος 2009 (8)
Ιούλιος 2009 (10)
Ιούνιος 2009 (21)
Συνδρομές
RSS 2.0
Atom 0.3