.net - CQRS Command Constructs -


i have cqrs command

public sealed class requestroute {     public requestroute(string fromaddressname, double fromlatitude, double fromlongitude, string toaddressname, double tolatitude, double tolongitude, string userid)     {         userid = userid;         tolongitude = tolongitude;         tolatitude = tolatitude;         toaddressname = toaddressname;         fromlongitude = fromlongitude;         fromlatitude = fromlatitude;         fromaddressname = fromaddressname;     }      public string fromaddressname { get; private set; }     public double fromlatitude { get; private set; }     public double fromlongitude { get; private set; }      public string toaddressname { get; private set; }     public double tolatitude { get; private set; }     public double tolongitude { get; private set; }      public string userid { get; private set; } } 

my programmer's intuition tells me should factor fromxxx , toxxx fields separate class called "address"...but i'm not sure if violates cqrs pattern... of examples i've seen use primitive types properties of commands , events.

to money, there's no real value in such refactoring.

writing route.tolatitude or route.to.latitude not change neither in readability nor during maintenance.

however, change double field decimal (or string) avoid problem while moving dto serialization (be binary or not) between different platforms, machines or architectures.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -