public static BaseSalaryPackageModel ToBaseSalaryPackage(this SalaryPackage salaryPackage) { BaseSalaryPackageModel _result = new BaseSalaryPackageModel(); _result.SalaryPackageName = salaryPackage.SalaryPackageName; _result.IsActive = salaryPackage.IsActive; _result.Narration = salaryPackage.Narration; _result.TotalAmount = salaryPackage.TotalAmount; _result.CreatedDate = salaryPackage.CreatedDate; _result.ModifiedDate = salaryPackage.ModifiedDate; return(_result); }
public static SalaryPackage ToSalaryPackage(this BaseSalaryPackageModel salaryPackage) { SalaryPackage _result = new SalaryPackage(); if (salaryPackage.Id.HasValue) { _result.Id = salaryPackage.Id.GetValueOrDefault(); } _result.SalaryPackageName = salaryPackage.SalaryPackageName; _result.IsActive = salaryPackage.IsActive; _result.Narration = salaryPackage.Narration; _result.TotalAmount = salaryPackage.TotalAmount; _result.CreatedDate = salaryPackage.CreatedDate; _result.ModifiedDate = salaryPackage.ModifiedDate; return(_result); }