Exemplo n.º 1
0
        public CustomerEntity ConvertToEntity(CustomerModel entity)
        {
            if (entity == null)
                return null;

            var model = new CustomerEntity(entity.Id);
            model.CustomerSince = entity.CustomerSince;
            return model;
        }
Exemplo n.º 2
0
        public async Task<CustomerModel> ConvertToModel(CustomerEntity entity)
        {
            if (entity == null)
                return null;

            var model = new CustomerModel(entity.Id);
            model.CustomerSince = entity.CustomerSince;
            model.Projekts = await ProjektRepository.Instance.GetProjekteByCustomerId(model.Id);
            return model;
        }