Exemple #1
0
        public Company viewModelToCompany(CompanyVM model)
        {
            Company company = new Company
            {
                Id = model.Id,
                Name = model.Name,
                DateCreated = model.DateCreated,
                DateModified = model.DateModified
            };

            return company;
        }
Exemple #2
0
        public CompanyVM companyToViewModel(Company company)
        {
            CompanyVM model = new CompanyVM
            {
                Id = company.Id,
                Name = company.Name,
                Contacts = company.Contacts,
                DateCreated = company.DateCreated,
                DateModified = company.DateModified
            };

            return model;
        }