public CustomerEntity ConvertToEntity(CustomerModel entity) { if (entity == null) return null; var model = new CustomerEntity(entity.Id); model.CustomerSince = entity.CustomerSince; return model; }
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; }