public static IOBalanceDBV2Entity.Customer DtoToEntity(this CustomerDto dto) { IOBalanceDBV2Entity.Customer entity = null; if (!dto.IsNull()) { entity = new IOBalanceDBV2Entity.Customer { CustomerID = dto.CustomerId, CustomerCode = dto.CustomerCode, CustomerAddress = dto.CustomerAddress, CustomerName = dto.CustomerName, CreatedBy = dto.CreatedBy, DateCreated = dto.DateCreated, DateUpdated = dto.DateUpdated, UpdatedBy = dto.UpdatedBy, IsActive = dto.IsActive }; } return(entity); }
public static IOBalanceEntity.Customer DtoToEntity(this CustomerDto dto) { IOBalanceEntity.Customer entity = null; if (!dto.IsNull()) { entity = new IOBalanceEntity.Customer { CustomerCode = dto.CustomerCode.Trim(), FirstName = dto.FirstName.Trim(), LastName = dto.LastName.Trim(), MiddleName = dto.MiddleName, Extension = dto.Extension, BirthDate = dto.BirthDate, Address = dto.Address, City = dto.City, Region = dto.Region, ZipCode = dto.ZipCode, IsActive = true }; } return(entity); }