Esempio n. 1
0
        public static ClientDto ToDto(this Client model)
        {
            var dto = new ClientDto
            {
                ID          = model.ID,
                Name        = model.Name,
                Description = model.Description,
                PhoneNumber = model.PhoneNumber,
                CardNumber  = model.CardNumber
            };

            dto.MapDetails(model);
            dto.CanBeDeleted = (!model.Sales?.Any() ?? false) &&
                               !model.IsDeleted;

            return(dto);
        }