public CarWashToClientShortModel ToModel(CarWashFullEntity?entity) { if (entity == null) { throw new Exception(ExceptionMessage.EmptyResponse); } Id = entity.Id; Name = entity.Name; Location = entity.Location; IsOpen = CarWashWorkingHoursExtensions.IsCarWashOpen(entity); return(this); }
public CarWashToClientFullModel ToModel(CarWashFullEntity?entity) { if (entity == null) { throw new Exception(ExceptionMessage.EmptyResponse); } Id = entity.Id; Name = entity.Name; Email = entity.Email; Phone = entity.Phone; Location = entity.Location; CoordinateX = entity.CoordinateX; CoordinateY = entity.CoordinateY; Description = entity.Description; HasCafe = entity.HasCafe; HasRestZone = entity.HasRestZone; HasParking = entity.HasParking; HasWC = entity.HasWC; HasCardPayment = entity.HasCardPayment; WorkingHours = new CarWashWorkingHoursModel().ToModel(entity); IsOpen = CarWashWorkingHoursExtensions.IsCarWashOpen(entity); return(this); }