Exemplo n.º 1
0
        public static Account ToEntity(this AccountDto source)
        {
            if (source == null)
            {
                return(null);
            }

            var target = new Account();

            // Properties
            target.Id                    = source.Id;
            target.IsActivated           = source.IsActivated;
            target.IsOpen                = source.IsOpen;
            target.ActivationDate        = source.ActivationDate;
            target.ActivationCode        = source.ActivationCode;
            target.BillingPlanExpiryDate = source.BillingPlanExpiryDate;

            // User-defined partial method
            OnEntityCreating(source, target);

            return(target);
        }
Exemplo n.º 2
0
 static partial void OnEntityCreating(AccountDto source, Account target);
Exemplo n.º 3
0
 static partial void OnDtoCreating(Account source, AccountDto target);
Exemplo n.º 4
0
 public UserDto(int id, string firstName, string lastName, string role, string email, string passwordSalt, int accountId, AccountDto account)
 {
     this.Id           = id;
     this.FirstName    = firstName;
     this.LastName     = lastName;
     this.Role         = role;
     this.Email        = email;
     this.PasswordSalt = passwordSalt;
     this.AccountId    = accountId;
     this.Account      = account;
 }
Exemplo n.º 5
0
 public AssetDto(int id, string name, string description, int?usefulLifespan, string code, string digitalCode, System.DateTimeOffset?purchaseDate, decimal?purchasePrice, decimal salvageValue, string image, int assetTypeId, int accountId, decimal longitude, decimal latitude, AssetTypeDto assetType, AccountDto account, List <VerificationEntryDto> verificationEntries)
 {
     this.Id                  = id;
     this.Name                = name;
     this.Description         = description;
     this.UsefulLifespan      = usefulLifespan;
     this.Code                = code;
     this.DigitalCode         = digitalCode;
     this.PurchaseDate        = purchaseDate;
     this.PurchasePrice       = purchasePrice;
     this.SalvageValue        = salvageValue;
     this.Image               = image;
     this.AssetTypeId         = assetTypeId;
     this.AccountId           = accountId;
     this.Longitude           = longitude;
     this.Latitude            = latitude;
     this.AssetType           = assetType;
     this.Account             = account;
     this.VerificationEntries = verificationEntries;
 }